netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2] cxgb4: Avoid removal of uninserted tid
@ 2025-01-03  9:23 Anumula Murali Mohan Reddy
  2025-01-07  1:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Anumula Murali Mohan Reddy @ 2025-01-03  9:23 UTC (permalink / raw)
  To: netdev
  Cc: davem, kuba, andrew+netdev, pabeni, bharat,
	Anumula Murali Mohan Reddy

During ARP failure, tid is not inserted but _c4iw_free_ep()
attempts to remove tid which results in error.
This patch fixes the issue by avoiding removal of uninserted tid.

Fixes: 59437d78f088 ("cxgb4/chtls: fix ULD connection failures due to wrong TID base")
Signed-off-by: Anumula Murali Mohan Reddy <anumula@chelsio.com>
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
---
Changes since v1:
Addressed previous review comments
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index bc3af0054406..604dcfd49aa4 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -1799,7 +1799,10 @@ void cxgb4_remove_tid(struct tid_info *t, unsigned int chan, unsigned int tid,
 	struct adapter *adap = container_of(t, struct adapter, tids);
 	struct sk_buff *skb;
 
-	WARN_ON(tid_out_of_range(&adap->tids, tid));
+	if (tid_out_of_range(&adap->tids, tid)) {
+		dev_err(adap->pdev_dev, "tid %d out of range\n", tid);
+		return;
+	}
 
 	if (t->tid_tab[tid - adap->tids.tid_base]) {
 		t->tid_tab[tid - adap->tids.tid_base] = NULL;
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net v2] cxgb4: Avoid removal of uninserted tid
  2025-01-03  9:23 [PATCH net v2] cxgb4: Avoid removal of uninserted tid Anumula Murali Mohan Reddy
@ 2025-01-07  1:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-01-07  1:00 UTC (permalink / raw)
  To: Anumula Murali Mohan Reddy
  Cc: netdev, davem, kuba, andrew+netdev, pabeni, bharat

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri,  3 Jan 2025 14:53:27 +0530 you wrote:
> During ARP failure, tid is not inserted but _c4iw_free_ep()
> attempts to remove tid which results in error.
> This patch fixes the issue by avoiding removal of uninserted tid.
> 
> Fixes: 59437d78f088 ("cxgb4/chtls: fix ULD connection failures due to wrong TID base")
> Signed-off-by: Anumula Murali Mohan Reddy <anumula@chelsio.com>
> Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> 
> [...]

Here is the summary with links:
  - [net,v2] cxgb4: Avoid removal of uninserted tid
    https://git.kernel.org/netdev/net/c/4c1224501e9d

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-07  1:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03  9:23 [PATCH net v2] cxgb4: Avoid removal of uninserted tid Anumula Murali Mohan Reddy
2025-01-07  1:00 ` patchwork-bot+netdevbpf

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).