netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ayush Sawal <ayush.sawal@chelsio.com>
To: kuba@kernel.org, netdev@vger.kernel.org, davem@davemloft.net
Cc: secdev@chelsio.com, Ayush Sawal <ayush.sawal@chelsio.com>,
	Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Subject: [PATCH net 5/7] chtls: Replace skb_dequeue with skb_peek
Date: Wed,  6 Jan 2021 09:59:10 +0530	[thread overview]
Message-ID: <20210106042912.23512-6-ayush.sawal@chelsio.com> (raw)
In-Reply-To: <20210106042912.23512-1-ayush.sawal@chelsio.com>

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: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: Ayush Sawal <ayush.sawal@chelsio.com>
---
 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
index 3022c802d09a..ff3969a24d74 100644
--- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
@@ -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;
 
-- 
2.28.0.rc1.6.gae46588


  parent reply	other threads:[~2021-01-06  4:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06  4:29 [PATCH net 0/7] Bug fixes for chtls driver Ayush Sawal
2021-01-06  4:29 ` [PATCH net 1/7] chtls: Fix hardware tid leak Ayush Sawal
2021-01-06  4:29 ` [PATCH net 2/7] chtls: Remove invalid set_tcb call Ayush Sawal
2021-01-06  4:29 ` [PATCH net 3/7] chtls: Fix panic when route to peer not configured Ayush Sawal
2021-01-06  4:29 ` [PATCH net 4/7] chtls: Avoid unnecessary freeing of oreq pointer Ayush Sawal
2021-01-06  4:29 ` Ayush Sawal [this message]
2021-01-06  4:29 ` [PATCH net 6/7] chtls: Added a check to avoid NULL pointer dereference Ayush Sawal
2021-01-06  4:29 ` [PATCH net 7/7] chtls: Fix chtls resources release sequence Ayush Sawal
2021-01-08  1:20 ` [PATCH net 0/7] Bug fixes for chtls driver patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210106042912.23512-6-ayush.sawal@chelsio.com \
    --to=ayush.sawal@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=secdev@chelsio.com \
    --cc=vinay.yadav@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).