Skip to content

Commit

Permalink
chtls: Replace skb_dequeue with skb_peek
Browse files Browse the repository at this point in the history
The skb is unlinked twice, one in __skb_dequeue in function
chtls_reset_synq() and another in cleanup_syn_rcv_conn().
So in this patch using skb_peek() instead of __skb_dequeue(),
so that unlink will be handled only in cleanup_syn_rcv_conn().

Fixes: cc35c88 ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav <[email protected]>
Signed-off-by: Ayush Sawal <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
ayushsawl authored and kuba-moo committed Jan 8, 2021
1 parent f8d15d2 commit a84b2c0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ static void chtls_reset_synq(struct listen_ctx *listen_ctx)

while (!skb_queue_empty(&listen_ctx->synq)) {
struct chtls_sock *csk =
container_of((struct synq *)__skb_dequeue
container_of((struct synq *)skb_peek
(&listen_ctx->synq), struct chtls_sock, synq);
struct sock *child = csk->sk;

Expand Down

0 comments on commit a84b2c0

Please sign in to comment.