]> git.baikalelectronics.ru Git - kernel.git/commit
ipvlan: fix leak in ipvlan_rcv_frame
authorSabrina Dubroca <sd@queasysnail.net>
Mon, 16 Nov 2015 21:34:26 +0000 (22:34 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Nov 2015 19:39:28 +0000 (14:39 -0500)
commit2667490a7bdb4925ed1448c47377c748ec7bc107
tree73f8237dcd14a6d0f57e3fd99f4c98e4743c8777
parenta58ad4333487ac726581ac1fff6d767ca106bcbc
ipvlan: fix leak in ipvlan_rcv_frame

Pass a **skb to ipvlan_rcv_frame so that if skb_share_check returns a
new skb, we actually use it during further processing.

It's safe to ignore the new skb in the ipvlan_xmit_* functions, because
they call ipvlan_rcv_frame with local == true, so that dev_forward_skb
is called and always takes ownership of the skb.

Fixes: 35b69229bc37 ("ipvlan: Initial check-in of the IPVLAN driver.")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_core.c