Skip to contentSkip to conversation

cxgb4: Avoid removal of uninserted tid

PATCH Applied Anumula Murali Mohan Reddy 2 participants 2 messages Jan 3, 2025 – Jan 7, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 cxgb4: Avoid removal of uninserted tid

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

---
Changes since v1:
Addressed previous review comments

---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +4 -1
index bc3af0054406..604dcfd49aa4 100644
@@ -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;
Signature · 1 line
2.39.3
#1 lore raw
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 9 lines · 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")

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html