]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix for splice receive when used with software LRO
authorOctavian Purdila <opurdila@ixiacom.com>
Sat, 28 Jun 2008 00:27:21 +0000 (17:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Jun 2008 00:27:21 +0000 (17:27 -0700)
commit7f7e6fa367267c0172104a9e7d94072f8c796ca0
tree9104c9559f3bfbdb0868e04a46176989e65c2efa
parent4db352bda598a43abe2cd0ef6541bb532f6470f8
tcp: fix for splice receive when used with software LRO

If an skb has nr_frags set to zero but its frag_list is not empty (as
it can happen if software LRO is enabled), and a previous
tcp_read_sock has consumed the linear part of the skb, then
__skb_splice_bits:

(a) incorrectly reports an error and

(b) forgets to update the offset to account for the linear part

Any of the two problems will cause the subsequent __skb_splice_bits
call (the one that handles the frag_list skbs) to either skip data,
or, if the unadjusted offset is greater then the size of the next skb
in the frag_list, make tcp_splice_read loop forever.

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c