Skip to content

Commit d8654f4

Browse files
jim3madavem330
authored andcommitted
tls splice: remove inappropriate flags checking for MSG_PEEK
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 34e7434 commit d8654f4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/tls/tls_sw.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,8 +2018,7 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos,
20182018
if (copied < 0)
20192019
goto splice_read_end;
20202020

2021-
if (likely(!(flags & MSG_PEEK)))
2022-
tls_sw_advance_skb(sk, skb, copied);
2021+
tls_sw_advance_skb(sk, skb, copied);
20232022

20242023
splice_read_end:
20252024
release_sock(sk);

0 commit comments

Comments
 (0)