Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341732
b: refs/heads/master
c: 02275a2
h: refs/heads/master
v: v3
  • Loading branch information
Willy Tarreau authored and David S. Miller committed Dec 3, 2012
1 parent 27c81d6 commit 39dd330
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 077b393d05915f04e2629bfc47c6fce95cae7d3f
refs/heads/master: 02275a2ee7c0ea475b6f4a6428f5df592bc9d30b
12 changes: 8 additions & 4 deletions trunk/net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1494,15 +1494,19 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
copied += used;
offset += used;
}
/*
* If recv_actor drops the lock (e.g. TCP splice
/* If recv_actor drops the lock (e.g. TCP splice
* receive) the skb pointer might be invalid when
* getting here: tcp_collapse might have deleted it
* while aggregating skbs from the socket queue.
*/
skb = tcp_recv_skb(sk, seq-1, &offset);
if (!skb || (offset+1 != skb->len))
skb = tcp_recv_skb(sk, seq - 1, &offset);
if (!skb)
break;
/* TCP coalescing might have appended data to the skb.
* Try to splice more frags
*/
if (offset + 1 != skb->len)
continue;
}
if (tcp_hdr(skb)->fin) {
sk_eat_skb(sk, skb, false);
Expand Down

0 comments on commit 39dd330

Please sign in to comment.