Skip to content

Commit

Permalink
tls splice: remove inappropriate flags checking for MSG_PEEK
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jim3ma authored and davem330 committed May 12, 2021
1 parent 34e7434 commit d8654f4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/tls/tls_sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d8654f4

Please sign in to comment.