]> git.baikalelectronics.ru Git - kernel.git/commitdiff
chtls: Replace skb_dequeue with skb_peek
authorAyush Sawal <ayush.sawal@chelsio.com>
Wed, 6 Jan 2021 04:29:10 +0000 (09:59 +0530)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 Jan 2021 01:06:02 +0000 (17:06 -0800)
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: d389a7c785e7 ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: Ayush Sawal <ayush.sawal@chelsio.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c

index 3022c802d09a5d413f10880921535e47f3b515c3..ff3969a24d749ce56a3d3d5d75d6f7622786675b 100644 (file)
@@ -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;