skbuff: skb_segment: orphan frags before copying
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 10 Mar 2014 17:28:08 +0000 (19:28 +0200)
committerJiri Slaby <jslaby@suse.cz>
Mon, 23 Jun 2014 08:27:51 +0000 (10:27 +0200)
commit07d054ef6765b307277f02c11b51f0695d6b3d7c
tree16f1974bad7e567b5e08ae29194890c5a76beab2
parentf2a855e3e126a716b71ddf369754f70573b26bce
skbuff: skb_segment: orphan frags before copying

[ Upstream commit 1fd819ecb90cc9b822cd84d3056ddba315d3340f ]

skb_segment copies frags around, so we need
to copy them carefully to avoid accessing
user memory after reporting completion to userspace
through a callback.

skb_segment doesn't normally happen on datapath:
TSO needs to be disabled - so disabling zero copy
in this case does not look like a big deal.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/core/skbuff.c