skbuff: skb_segment: orphan frags before copying
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 10 Mar 2014 17:28:08 +0000 (19:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Mar 2014 20:26:38 +0000 (16:26 -0400)
commit1fd819ecb90cc9b822cd84d3056ddba315d3340f
treea6ebab17f5c69d2c9ef08aa5fa1426201adfa7e7
parent1a4cedaf65491e66e1e55b8428c89209da729209
skbuff: skb_segment: orphan frags before copying

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>
net/core/skbuff.c