diff mbox series

[net] tcp: add a missing sk_defer_free_flush() in tcp_splice_read()

Message ID 20220120124530.925607-1-eric.dumazet@gmail.com (mailing list archive)
State Accepted
Commit ebdc1a0309629e71e5910b353e6b005f022ce171
Delegated to: Netdev Maintainers
Headers show
Series [net] tcp: add a missing sk_defer_free_flush() in tcp_splice_read() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 2 this patch: 2
netdev/cc_maintainers warning 2 maintainers not CCed: dsahern@kernel.org yoshfuji@linux-ipv6.org
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 7 this patch: 7
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Eric Dumazet Jan. 20, 2022, 12:45 p.m. UTC
From: Eric Dumazet <edumazet@google.com>

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

Fixes: f35f821935d8 ("tcp: defer skb freeing after socket lock is released")
Fixes: 79074a72d335 ("net: Flush deferred skb free on socket destroy")
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Gal Pressman <gal@nvidia.com>
---
 net/ipv4/tcp.c | 1 +
 1 file changed, 1 insertion(+)

Comments

patchwork-bot+netdevbpf@kernel.org Jan. 21, 2022, 6 a.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 20 Jan 2022 04:45:30 -0800 you wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> Without it, splice users can hit the warning
> added in commit 79074a72d335 ("net: Flush deferred skb free on socket destroy")
> 
> Fixes: f35f821935d8 ("tcp: defer skb freeing after socket lock is released")
> Fixes: 79074a72d335 ("net: Flush deferred skb free on socket destroy")
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Gal Pressman <gal@nvidia.com>
> 
> [...]

Here is the summary with links:
  - [net] tcp: add a missing sk_defer_free_flush() in tcp_splice_read()
    https://git.kernel.org/netdev/net/c/ebdc1a030962

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 3b75836db19b07b0f178ef4457bda0ec641fd40d..78e81465f5f3632f54093495d2f2a064e60c7237 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -842,6 +842,7 @@  ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos,
 	}
 
 	release_sock(sk);
+	sk_defer_free_flush(sk);
 
 	if (spliced)
 		return spliced;