Skip to content

Commit b782756

Browse files
Ursula Braungregkh
authored andcommitted
qeth: delete napi struct when removing a qeth device
commit 7831b4ff0d926e0deeaabef9db8800ed069a2757 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: a1c3ed4 ("qeth: NAPI support for l2 and l3 discipline") Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Tested-by: Alexander Klein <ALKL@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 69ca969 commit b782756

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/s390/net/qeth_l2_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,7 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev)
10511051
qeth_l2_set_offline(cgdev);
10521052

10531053
if (card->dev) {
1054+
netif_napi_del(&card->napi);
10541055
unregister_netdev(card->dev);
10551056
card->dev = NULL;
10561057
}

drivers/s390/net/qeth_l3_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3246,6 +3246,7 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev)
32463246
qeth_l3_set_offline(cgdev);
32473247

32483248
if (card->dev) {
3249+
netif_napi_del(&card->napi);
32493250
unregister_netdev(card->dev);
32503251
card->dev = NULL;
32513252
}

0 commit comments

Comments
 (0)