diff options
author | Eric Dumazet <[email protected]> | 2022-01-31 22:52:54 -0800 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2022-02-01 20:21:40 -0800 |
commit | 479f5547239d970d3833f15f54a6481fffdb91ec (patch) | |
tree | 524d5d9fedeea8d2594e0b7bdb9f524da541143a /net/lapb/lapb_iface.c | |
parent | e42e70ad6ae2ae511a6143d2e8da929366e58bd9 (diff) |
tcp: fix mem under-charging with zerocopy sendmsg()
We got reports of following warning in inet_sock_destruct()
WARN_ON(sk_forward_alloc_get(sk));
Whenever we add a non zero-copy fragment to a pure zerocopy skb,
we have to anticipate that whole skb->truesize will be uncharged
when skb is finally freed.
skb->data_len is the payload length. But the memory truesize
estimated by __zerocopy_sg_from_iter() is page aligned.
Fixes: 9b65b17db723 ("net: avoid double accounting for pure zerocopy skbs")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Talal Ahmad <[email protected]>
Cc: Arjun Roy <[email protected]>
Cc: Willem de Bruijn <[email protected]>
Acked-by: Soheil Hassas Yeganeh <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions