ACK: [PATCH P/T/U/X SRU] qeth: delete napi struct when removing a qeth device
Christopher Arges
chris.j.arges at canonical.com
Mon Jul 11 14:58:00 UTC 2016
Clean-cherry pick, good enough for stable. Fixes a specific issue.
--chris
On Mon, Jul 11, 2016 at 08:25:20AM -0600, Tim Gardner wrote:
> From: Ursula Braun <ubraun at linux.vnet.ibm.com>
>
> BugLink: http://bugs.launchpad.net/bugs/1601831
>
> 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: a1c3ed4c9ca ("qeth: NAPI support for l2 and l3 discipline")
> Cc: stable at vger.kernel.org # v2.6.37+
> Signed-off-by: Ursula Braun <ubraun at linux.vnet.ibm.com>
> Tested-by: Alexander Klein <ALKL at de.ibm.com>
> Signed-off-by: David S. Miller <davem at davemloft.net>
> (cherry picked from commit 7831b4ff0d926e0deeaabef9db8800ed069a2757)
> Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
> ---
> drivers/s390/net/qeth_l2_main.c | 1 +
> drivers/s390/net/qeth_l3_main.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
> index 8cd15fe..4a278d4 100644
> --- a/drivers/s390/net/qeth_l2_main.c
> +++ b/drivers/s390/net/qeth_l2_main.c
> @@ -898,6 +898,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;
> }
> diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
> index c882aab..02fb895 100644
> --- a/drivers/s390/net/qeth_l3_main.c
> +++ b/drivers/s390/net/qeth_l3_main.c
> @@ -3334,6 +3334,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;
> }
> --
> 1.9.1
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list