lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Ybhw2JBqjRBOlyn1@lunn.ch>
Date:   Tue, 14 Dec 2021 11:24:24 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Joakim Zhang <qiangqing.zhang@....com>
Cc:     davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-imx@....com
Subject: Re: [PATCH net-next] net: fec: fix system hang during suspend/resume

On Tue, Dec 14, 2021 at 10:53:50AM +0800, Joakim Zhang wrote:
> 1. During normal suspend (WoL not enabled) process, system has posibility
> to hang. The root cause is TXF interrupt coming after clocks disabled,
> system hang when accessing registers from interrupt handler. To fix this
> issue, disable all interrupts when system suspend.
> 
> 2. System also has posibility to hang with WoL enabled during suspend,
> after entering stop mode, then magic pattern coming after clocks
> disabled, system will be waked up, and interrupt handler will be called,
> system hang when access registers. To fix this issue, disable wakeup
> irq in .suspend(), and enable it in .resume().
> 
> Signed-off-by: Joakim Zhang <qiangqing.zhang@....com>
> ---
> Send to net-next although this is a bug fix, since there is no suitable
> commit to be blamed, can be back ported to stable tree if others need.
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 46 +++++++++++++++++------
>  1 file changed, 34 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 613b8180a1bd..786dcb923697 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1185,6 +1185,21 @@ static void fec_enet_stop_mode(struct fec_enet_private *fep, bool enabled)
>  	}
>  }
>  
> +static inline void fec_irqs_disable(struct net_device *ndev)

Please don't use inline in .c files. Let the compiler decide.

       Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ