]>
Commit | Line | Data |
---|---|---|
0510f465 GKH |
1 | From 7831b4ff0d926e0deeaabef9db8800ed069a2757 Mon Sep 17 00:00:00 2001 |
2 | From: Ursula Braun <ubraun@linux.vnet.ibm.com> | |
3 | Date: Mon, 4 Jul 2016 14:07:16 +0200 | |
4 | Subject: qeth: delete napi struct when removing a qeth device | |
5 | ||
6 | From: Ursula Braun <ubraun@linux.vnet.ibm.com> | |
7 | ||
8 | commit 7831b4ff0d926e0deeaabef9db8800ed069a2757 upstream. | |
9 | ||
10 | A qeth_card contains a napi_struct linked to the net_device during | |
11 | device probing. This struct must be deleted when removing the qeth | |
12 | device, otherwise Panic on oops can occur when qeth devices are | |
13 | repeatedly removed and added. | |
14 | ||
15 | Fixes: a1c3ed4c9ca ("qeth: NAPI support for l2 and l3 discipline") | |
16 | Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> | |
17 | Tested-by: Alexander Klein <ALKL@de.ibm.com> | |
18 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
20 | ||
21 | --- | |
22 | drivers/s390/net/qeth_l2_main.c | 1 + | |
23 | drivers/s390/net/qeth_l3_main.c | 1 + | |
24 | 2 files changed, 2 insertions(+) | |
25 | ||
26 | --- a/drivers/s390/net/qeth_l2_main.c | |
27 | +++ b/drivers/s390/net/qeth_l2_main.c | |
28 | @@ -906,6 +906,7 @@ static void qeth_l2_remove_device(struct | |
29 | qeth_l2_set_offline(cgdev); | |
30 | ||
31 | if (card->dev) { | |
32 | + netif_napi_del(&card->napi); | |
33 | unregister_netdev(card->dev); | |
34 | card->dev = NULL; | |
35 | } | |
36 | --- a/drivers/s390/net/qeth_l3_main.c | |
37 | +++ b/drivers/s390/net/qeth_l3_main.c | |
38 | @@ -3333,6 +3333,7 @@ static void qeth_l3_remove_device(struct | |
39 | qeth_l3_set_offline(cgdev); | |
40 | ||
41 | if (card->dev) { | |
42 | + netif_napi_del(&card->napi); | |
43 | unregister_netdev(card->dev); | |
44 | card->dev = NULL; | |
45 | } |