]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix oops when splicing skbs from a frag_list.
authorJarek Poplawski <jarkao2@gmail.com>
Thu, 30 Apr 2009 12:41:19 +0000 (05:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Apr 2009 12:41:19 +0000 (05:41 -0700)
commit676e91f1752930b4ce000d7d03c511a07805d197
tree9bbddde4ab62836ab6d488f98ca653d56d6cb142
parented1995e64211de98c9a8f2657f9aa1188292ca75
net: Fix oops when splicing skbs from a frag_list.

Lennert Buytenhek wrote:
> Since 0197d5b8da535503b5756cb1587ac585184adc1e ("net: Optimize memory
> usage when splicing from sockets.") I'm seeing this oops (e.g. in
> 2.6.30-rc3) when splicing from a TCP socket to /dev/null on a driver
> (mv643xx_eth) that uses LRO in the skb mode (lro_receive_skb) rather
> than the frag mode:

My patch incorrectly assumed skb->sk was always valid, but for
"frag_listed" skbs we can only use skb->sk of their parent.

Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
Debugged-by: Lennert Buytenhek <buytenh@wantstofly.org>
Tested-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c