[PATCH net-next] cxgb4: Fix queue free path of ULD drivers

Subsystems: cxgb4 ethernet driver (cxgb4), networking drivers, the rest

STALE3138d

2 messages, 2 authors, 2018-03-17 · open the first message on its own page

[PATCH net-next] cxgb4: Fix queue free path of ULD drivers

From: Ganesh Goudar <hidden>
Date: 2018-03-15 12:04:20

From: Arjun Vynipadath <redacted>

Setting sge_uld_rxq_info to NULL in free_queues_uld().
We are referencing sge_uld_rxq_info in cxgb_up(). This
will fix a panic when interface is brought up after a
ULDq creation failure.

Fixes: 94cdb8bb993a (cxgb4: Add support for dynamic allocation
       of resources for ULD)
Signed-off-by: Arjun Vynipadath <redacted>
Signed-off-by: Casey Leedom <redacted>
Signed-off-by: Ganesh Goudhar <redacted>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
index 6b5fea4..2d82714 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
@@ -342,6 +342,7 @@ static void free_queues_uld(struct adapter *adap, unsigned int uld_type)
 {
 	struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type];
 
+	adap->sge.uld_rxq_info[uld_type] = NULL;
 	kfree(rxq_info->rspq_id);
 	kfree(rxq_info->uldrxq);
 	kfree(rxq_info);
-- 
2.1.0

Re: [PATCH net-next] cxgb4: Fix queue free path of ULD drivers

From: David Miller <davem@davemloft.net>
Date: 2018-03-17 21:20:24

From: Ganesh Goudar <redacted>
Date: Thu, 15 Mar 2018 17:34:14 +0530
From: Arjun Vynipadath <redacted>

Setting sge_uld_rxq_info to NULL in free_queues_uld().
We are referencing sge_uld_rxq_info in cxgb_up(). This
will fix a panic when interface is brought up after a
ULDq creation failure.

Fixes: 94cdb8bb993a (cxgb4: Add support for dynamic allocation
       of resources for ULD)
Signed-off-by: Arjun Vynipadath <redacted>
Signed-off-by: Casey Leedom <redacted>
Signed-off-by: Ganesh Goudhar <redacted>
Applied, thank you.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help