Commit f6aabfad authored by Ursula Braun's avatar Ursula Braun Committed by Greg Kroah-Hartman

qeth: delete napi struct when removing a qeth device

commit 7831b4ff upstream.

A qeth_card contains a napi_struct linked to the net_device during
device probing. This struct must be deleted when removing the qeth
device, otherwise Panic on oops can occur when qeth devices are
repeatedly removed and added.

Fixes: a1c3ed4c ("qeth: NAPI support for l2 and l3 discipline")
Signed-off-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
Tested-by: default avatarAlexander Klein <ALKL@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e6fa9623
...@@ -906,6 +906,7 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev) ...@@ -906,6 +906,7 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev)
qeth_l2_set_offline(cgdev); qeth_l2_set_offline(cgdev);
if (card->dev) { if (card->dev) {
netif_napi_del(&card->napi);
unregister_netdev(card->dev); unregister_netdev(card->dev);
card->dev = NULL; card->dev = NULL;
} }
......
...@@ -3333,6 +3333,7 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev) ...@@ -3333,6 +3333,7 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev)
qeth_l3_set_offline(cgdev); qeth_l3_set_offline(cgdev);
if (card->dev) { if (card->dev) {
netif_napi_del(&card->napi);
unregister_netdev(card->dev); unregister_netdev(card->dev);
card->dev = NULL; card->dev = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment