mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
cxgb4: fix memory leak during module unload
[ Upstream commitf4a26a9b31] 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:28b3870578("cxgb4: Re-work the logic for mps refcounting") Signed-off-by: Raju Rangoju <rajur@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6743a9b020
commit
2583159735
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user