]> git.baikalelectronics.ru Git - kernel.git/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)
commit0a67c8280f7d5e22f9080778dd27952f453a47cf
treea6ebab17f5c69d2c9ef08aa5fa1426201adfa7e7
parent33e54ca466d29aee3b66ceaf977c3b5dc189b2ba
parent9535778de328b44ff48d48c82d188f767c24f3d8
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>