core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
authorZoltan Kiss <zoltan.kiss@citrix.com>
Wed, 26 Mar 2014 22:37:45 +0000 (22:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jul 2014 19:53:52 +0000 (12:53 -0700)
commitc5f0c0e7525443add533495e93ba8de6feab2396
tree6d2531b43aecaffe5155e688e0371427da30d893
parent819ab9941c98f18b0f8c7ffb815e4f07186d2a5f
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

commit 36d5fe6a000790f56039afe26834265db0a3ad4c upstream.

skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the callers so they will signal the failed delivery towards the creator of the
skb.

Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.13: skb_zerocopy() is new in 3.14, but was moved from a
 static function in nfnetlink_queue.  We need to patch that and its caller, but
 not openvswitch.]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nfnetlink_queue_core.c