Skip to contentSkip to conversation

myri10ge: fix rmmod crash

PATCH In review Stanislaw Gruszka 3 participants 3 messages Mar 23, 2011

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

PATCH 1/1 myri10ge: fix rmmod crash

Rmmod myri10ge crash at free_netdev() -> netif_napi_del(), because napi structures are already deallocated. To fix call netif_napi_del() before kfree() at myri10ge_free_slices().

---
 drivers/net/myri10ge/myri10ge.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/myri10ge/myri10ge.c +1 -0
index ea5cfe2..24386a8 100644
@@ -3645,6 +3645,7 @@ static void myri10ge_free_slices(struct myri10ge_priv *mgp)
 			dma_free_coherent(&pdev->dev, bytes,
 					  ss->fw_stats, ss->fw_stats_bus);
 			ss->fw_stats = NULL;
+			netif_napi_del(&ss->napi);
 		}
 	}
 	kfree(mgp->ss);
Signature · 6 lines
1.7.1

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable
#1 lore raw
Quoted 3 lines · Stanislaw Gruszka

Rmmod myri10ge crash at free_netdev() -> netif_napi_del(), because napi structures are already deallocated. To fix call netif_napi_del() before kfree() at myri10ge_free_slices().

I apologize; I made a similar fix myself to our tree last fall simply forgot to post it to netdev... I'm terribly sorry for the time
you wasted chasing this. At any rate...

Acked by: Andrew Gallatin <[email protected]>

maintainer
#2 lore raw

From: Andrew Gallatin <[email protected]>
Date: Wed, 23 Mar 2011 09:09:37 -0400

Quoted 7 lines · Stanislaw Gruszka
Quoted 5 lines

Rmmod myri10ge crash at free_netdev() -> netif_napi_del(), because napi
structures are already deallocated. To fix call netif_napi_del() before
kfree() at myri10ge_free_slices().

Quoted 5 lines

I apologize; I made a similar fix myself to our tree last fall simply forgot to post it to netdev... I'm terribly sorry for the time
you wasted chasing this. At any rate...

Acked by: Andrew Gallatin <[email protected]>

Patch applied, thanks everyone.