tcp: fix skb_availroom()
Chrome OS team reported a crash on a Pixel ChromeBook in TCP stack : https://code.google.com/p/chromium/issues/detail?id=182056 commita21d45726a(tcp: avoid order-1 allocations on wifi and tx path) did a poor choice adding an 'avail_size' field to skb, while what we really needed was a 'reserved_tailroom' one. It would have avoided commit22b4a4f22d(tcp: fix retransmit of partially acked frames) and this commit. Crash occurs because skb_split() is not aware of the 'avail_size' management (and should not be aware) Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Mukesh Agrawal <quiche@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
b701f16dd4
commit
16fad69cfe
@@ -1298,7 +1298,6 @@ static void __pskb_trim_head(struct sk_buff *skb, int len)
|
||||
eat = min_t(int, len, skb_headlen(skb));
|
||||
if (eat) {
|
||||
__skb_pull(skb, eat);
|
||||
skb->avail_size -= eat;
|
||||
len -= eat;
|
||||
if (!len)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user