mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
[PATCH] iseries_veth: Don't leak skbs in RX path
Hi Andrew, Jeff, Under some strange circumstances the iseries_veth driver can leak skbs. Fix is simply to call dev_kfree_skb() in the right place. Fix up the comment as well. Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
This commit is contained in:
parent
eb235aef72
commit
41664c03f6
@ -1264,13 +1264,18 @@ static void veth_receive(struct veth_lpar_connection *cnx,
|
|||||||
|
|
||||||
vlan = skb->data[9];
|
vlan = skb->data[9];
|
||||||
dev = veth_dev[vlan];
|
dev = veth_dev[vlan];
|
||||||
if (! dev)
|
if (! dev) {
|
||||||
/* Some earlier versions of the driver sent
|
/*
|
||||||
broadcasts down all connections, even to
|
* Some earlier versions of the driver sent
|
||||||
lpars that weren't on the relevant vlan.
|
* broadcasts down all connections, even to lpars
|
||||||
So ignore packets belonging to a vlan we're
|
* that weren't on the relevant vlan. So ignore
|
||||||
not on. */
|
* packets belonging to a vlan we're not on.
|
||||||
|
* We can also be here if we receive packets while
|
||||||
|
* the driver is going down, because then dev is NULL.
|
||||||
|
*/
|
||||||
|
dev_kfree_skb_irq(skb);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
port = (struct veth_port *)dev->priv;
|
port = (struct veth_port *)dev->priv;
|
||||||
dest = *((u64 *) skb->data) & 0xFFFFFFFFFFFF0000;
|
dest = *((u64 *) skb->data) & 0xFFFFFFFFFFFF0000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user