Message ID | 7faf1af984494296416646af7b44851dfb450866.1620808650.git.majinjing3@gmail.com |
---|---|
State | New |
Headers | show |
Series | tls splice: remove inappropriate flags checking for MSG_PEEK | expand |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Wed, 12 May 2021 17:00:11 +0800 you wrote: > In function tls_sw_splice_read, before call tls_sw_advance_skb > it checks likely(!(flags & MSG_PEEK)), while MSG_PEEK is used > for recvmsg, splice supports SPLICE_F_NONBLOCK, SPLICE_F_MOVE, > SPLICE_F_MORE, should remove this checking. > > Signed-off-by: Jim Ma <majinjing3@gmail.com> > > [...] Here is the summary with links: - tls splice: remove inappropriate flags checking for MSG_PEEK https://git.kernel.org/netdev/net-next/c/d8654f4f9300 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 1dcb34dfd56b..7b59ec9a24c5 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -2018,8 +2018,7 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos, if (copied < 0) goto splice_read_end; - if (likely(!(flags & MSG_PEEK))) - tls_sw_advance_skb(sk, skb, copied); + tls_sw_advance_skb(sk, skb, copied); splice_read_end: release_sock(sk);
In function tls_sw_splice_read, before call tls_sw_advance_skb it checks likely(!(flags & MSG_PEEK)), while MSG_PEEK is used for recvmsg, splice supports SPLICE_F_NONBLOCK, SPLICE_F_MOVE, SPLICE_F_MORE, should remove this checking. Signed-off-by: Jim Ma <majinjing3@gmail.com> --- net/tls/tls_sw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)