netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] myri10ge: fix rmmod crash
@ 2011-03-23 12:44 Stanislaw Gruszka
  2011-03-23 13:09 ` Andrew Gallatin
  0 siblings, 1 reply; 3+ messages in thread
From: Stanislaw Gruszka @ 2011-03-23 12:44 UTC (permalink / raw)
  To: netdev; +Cc: stable, Brice Goglin, Andrew Gallatin

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().

Cc: stable@kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/myri10ge/myri10ge.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index ea5cfe2..24386a8 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -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);
-- 
1.7.1

_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] myri10ge: fix rmmod crash
  2011-03-23 12:44 [PATCH] myri10ge: fix rmmod crash Stanislaw Gruszka
@ 2011-03-23 13:09 ` Andrew Gallatin
  2011-03-23 19:31   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Gallatin @ 2011-03-23 13:09 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: netdev, Brice Goglin, stable

On 03/23/11 08:44, Stanislaw Gruszka wrote:
> 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 <gallatin@myri.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] myri10ge: fix rmmod crash
  2011-03-23 13:09 ` Andrew Gallatin
@ 2011-03-23 19:31   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-03-23 19:31 UTC (permalink / raw)
  To: gallatin; +Cc: sgruszka, netdev, brice, stable

From: Andrew Gallatin <gallatin@myri.com>
Date: Wed, 23 Mar 2011 09:09:37 -0400

> On 03/23/11 08:44, Stanislaw Gruszka wrote:
>> 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 <gallatin@myri.com>

Patch applied, thanks everyone.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-23 19:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-23 12:44 [PATCH] myri10ge: fix rmmod crash Stanislaw Gruszka
2011-03-23 13:09 ` Andrew Gallatin
2011-03-23 19:31   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).