Commit ebdc1a03 authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski

tcp: add a missing sk_defer_free_flush() in tcp_splice_read()

Without it, splice users can hit the warning
added in commit 79074a72 ("net: Flush deferred skb free on socket destroy")

Fixes: f35f8219 ("tcp: defer skb freeing after socket lock is released")
Fixes: 79074a72 ("net: Flush deferred skb free on socket destroy")
Suggested-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Gal Pressman <gal@nvidia.com>
Link: https://lore.kernel.org/r/20220120124530.925607-1-eric.dumazet@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 48cec899
...@@ -842,6 +842,7 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos, ...@@ -842,6 +842,7 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos,
} }
release_sock(sk); release_sock(sk);
sk_defer_free_flush(sk);
if (spliced) if (spliced)
return spliced; return spliced;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment