[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJH0kmyTgLp4rJGL1EYo4hQ_qcd3t3JQS-s-e9FY8ERTPrmwqQ@mail.gmail.com>
Date: Thu, 4 Mar 2021 13:50:01 +0100
From: Zbynek Michl <zbynek.michl@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org
Subject: Re: [regression] Kernel panic on resume from sleep
Looks good so far, but need to wait some more time as the issue was irregular.
Do you have any explanation why the calls disorder caused the panic
just occasionally?
Also, the same (wrong) order I can see in the 3.16 kernel code, but it
has worked fine with this kernel in all cases. So what is different in
5.10?
Thanks
Zbynek
On Wed, Mar 3, 2021 at 2:44 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Mon, 1 Mar 2021 23:11:05 +0100 Zbynek Michl wrote:
> > Hello,
> >
> > Can anybody help me with the following kernel issue?
> > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983595
> >
> > Do I understand it correctly that the kernel crashes due to the bug in
> > the alx driver?
>
> Order of calls on resume looks suspicious, can you give this a try?
>
> diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
> index 9b7f1af5f574..9e02f8864593 100644
> --- a/drivers/net/ethernet/atheros/alx/main.c
> +++ b/drivers/net/ethernet/atheros/alx/main.c
> @@ -1894,13 +1894,16 @@ static int alx_resume(struct device *dev)
>
> if (!netif_running(alx->dev))
> return 0;
> - netif_device_attach(alx->dev);
>
> rtnl_lock();
> err = __alx_open(alx, true);
> rtnl_unlock();
> + if (err)
> + return err;
>
> - return err;
> + netif_device_attach(alx->dev);
> +
> + return 0;
> }
>
> static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
Powered by blists - more mailing lists