* [PATCH net] cxgb4: fix memory leak during module unload
@ 2020-09-16 16:20 Raju Rangoju
2020-09-17 23:34 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Raju Rangoju @ 2020-09-16 16:20 UTC (permalink / raw)
To: netdev; +Cc: davem, vishal, dt, rajur
Fix the memory leak in mps during module unload
path by freeing mps reference entries if the list
adpter->mps_ref is not already empty
Fixes: 28b3870578ef ("cxgb4: Re-work the logic for mps refcounting")
Signed-off-by: Raju Rangoju <rajur@chelsio.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c
index b1a073eea60b..a020e8490681 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c
@@ -229,7 +229,7 @@ void cxgb4_free_mps_ref_entries(struct adapter *adap)
{
struct mps_entries_ref *mps_entry, *tmp;
- if (!list_empty(&adap->mps_ref))
+ if (list_empty(&adap->mps_ref))
return;
spin_lock(&adap->mps_ref_lock);
--
2.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] cxgb4: fix memory leak during module unload
2020-09-16 16:20 [PATCH net] cxgb4: fix memory leak during module unload Raju Rangoju
@ 2020-09-17 23:34 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-09-17 23:34 UTC (permalink / raw)
To: rajur; +Cc: netdev, vishal, dt
From: Raju Rangoju <rajur@chelsio.com>
Date: Wed, 16 Sep 2020 21:50:39 +0530
> Fix the memory leak in mps during module unload
> path by freeing mps reference entries if the list
> adpter->mps_ref is not already empty
>
> Fixes: 28b3870578ef ("cxgb4: Re-work the logic for mps refcounting")
> Signed-off-by: Raju Rangoju <rajur@chelsio.com>
Applied and queued up for -stable, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-17 23:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 16:20 [PATCH net] cxgb4: fix memory leak during module unload Raju Rangoju
2020-09-17 23:34 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.