Skip to content

Commit

Permalink
qeth: delete napi struct when removing a qeth device
Browse files Browse the repository at this point in the history
commit 7831b4f 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>
  • Loading branch information
Ursula Braun authored and Greg Kroah-Hartman committed Aug 10, 2016
1 parent e6fa962 commit f6aabfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/s390/net/qeth_l2_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev)
qeth_l2_set_offline(cgdev);

if (card->dev) {
netif_napi_del(&card->napi);
unregister_netdev(card->dev);
card->dev = NULL;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/s390/net/qeth_l3_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3333,6 +3333,7 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev)
qeth_l3_set_offline(cgdev);

if (card->dev) {
netif_napi_del(&card->napi);
unregister_netdev(card->dev);
card->dev = NULL;
}
Expand Down

0 comments on commit f6aabfa

Please sign in to comment.