]> Pileus Git - ~andy/linux/commit
Merge branch 'skb_frags'
authorDavid S. Miller <davem@davemloft.net>
Tue, 11 Mar 2014 20:26:46 +0000 (16:26 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Mar 2014 20:26:46 +0000 (16:26 -0400)
commitc7b76f854e01cfdfdfaeb22b2ba1350be5d09ad7
treea6ebab17f5c69d2c9ef08aa5fa1426201adfa7e7
parent9d79b3c7aae582df9eebcea8797c41cd5d5fc39c
parent1fd819ecb90cc9b822cd84d3056ddba315d3340f
Merge branch 'skb_frags'

Michael S. Tsirkin says:

====================
skbuff: fix skb_segment with zero copy skbs

This fixes a bug in skb_segment where it moves frags
between skbs without orphaning them.
This causes userspace to assume it's safe to
reuse the buffer, and receiver gets corrupted data.
This further might leak information from the
transmitter on the wire.

To fix track which skb does a copied frag belong
to, and orphan frags when copying them.

As we are tracking multiple skbs here, using
short names (skb,nskb,fskb,skb_frag,frag) becomes confusing.
So before adding another one, I refactor these names
slightly.

Patch is split out to make it easier to
verify that all trasformations are trivially correct.

The problem was observed in the field,
so I think that the patch is necessary on stable
as well.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>