summaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge/myri10ge.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-03-23 03:44:30 +0100
committerDavid S. Miller <davem@davemloft.net>2011-03-23 20:31:39 +0100
commitcda6587c21a887254c8ed4b58da8fcc4040ab557 (patch)
treef92a7640fedc4684f37e91116cbb66d38b9c9b52 /drivers/net/myri10ge/myri10ge.c
parentmlx4_en: updated driver version to 1.5.4.1 (diff)
downloadlinux-cda6587c21a887254c8ed4b58da8fcc4040ab557.tar.xz
linux-cda6587c21a887254c8ed4b58da8fcc4040ab557.zip
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(). Cc: stable@kernel.org Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r--drivers/net/myri10ge/myri10ge.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index a7f2eed9a08a..1f4e8680a96a 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);