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)
commitcf554ada0be7077906aa9a17faf151ff66e3cb8e
tree73f8237dcd14a6d0f57e3fd99f4c98e4743c8777
parenteb3f8b42aaba19325eff7e99842ca36429a0a3b8
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: 2ad7bf363841 ("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