]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
myri10ge: fix rmmod crash
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 23 Mar 2011 02:44:30 +0000 (02:44 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Apr 2011 23:52:46 +0000 (16:52 -0700)
commit cda6587c21a887254c8ed4b58da8fcc4040ab557 upstream.

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

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/myri10ge/myri10ge.c

index 3fcb1c356e0d157de807fc1a729bf9b1af19b48e..e5a846e8196cf6f160926164ad09b407c4c250e2 100644 (file)
@@ -3643,6 +3643,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);