提交 cda6587c 编写于 作者: S Stanislaw Gruszka 提交者: David S. Miller

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: NStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 61b85bf6
...@@ -3645,6 +3645,7 @@ static void myri10ge_free_slices(struct myri10ge_priv *mgp) ...@@ -3645,6 +3645,7 @@ static void myri10ge_free_slices(struct myri10ge_priv *mgp)
dma_free_coherent(&pdev->dev, bytes, dma_free_coherent(&pdev->dev, bytes,
ss->fw_stats, ss->fw_stats_bus); ss->fw_stats, ss->fw_stats_bus);
ss->fw_stats = NULL; ss->fw_stats = NULL;
netif_napi_del(&ss->napi);
} }
} }
kfree(mgp->ss); kfree(mgp->ss);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册