]> git.baikalelectronics.ru Git - kernel.git/commit
skbuff: fix ftrace handling in skb_unshare
authorAlexander Aring <alex.aring@gmail.com>
Fri, 10 Oct 2014 21:10:47 +0000 (23:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Oct 2014 17:10:31 +0000 (13:10 -0400)
commitd3a7abe5551cab02f06c43fecfe6b5b04ca58d1d
treed9a63b8a16e7f8a2cc80a85011cf3f07d465af25
parent10d362683bab50b748128db08d86d864c6413af3
skbuff: fix ftrace handling in skb_unshare

If the skb is not dropped afterwards we should run consume_skb instead
kfree_skb. Inside of function skb_unshare we do always a kfree_skb,
doesn't depend if skb_copy failed or was successful.

This patch switch this behaviour like skb_share_check, if allocation of
sk_buff failed we use kfree_skb otherwise consume_skb.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h