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: <2024091355-remedy-cadmium-7de9@gregkh>
Date: Fri, 13 Sep 2024 14:49:25 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Sean Anderson <sean.anderson@...ux.dev>
Cc: stable@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
	netdev@...r.kernel.org
Subject: Re: [PATCH] net: xilinx: axienet: Fix race in axienet_stop

On Tue, Sep 10, 2024 at 10:46:07AM -0400, Sean Anderson wrote:
> [ Upstream commit 858430db28a5f5a11f8faa3a6fa805438e6f0851 ]
> 
> axienet_dma_err_handler can race with axienet_stop in the following
> manner:
> 
> CPU 1                       CPU 2
> ======================      ==================
> axienet_stop()
>     napi_disable()
>     axienet_dma_stop()
>                             axienet_dma_err_handler()
>                                 napi_disable()
>                                 axienet_dma_stop()
>                                 axienet_dma_start()
>                                 napi_enable()
>     cancel_work_sync()
>     free_irq()
> 
> Fix this by setting a flag in axienet_stop telling
> axienet_dma_err_handler not to bother doing anything. I chose not to use
> disable_work_sync to allow for easier backporting.
> 
> Signed-off-by: Sean Anderson <sean.anderson@...ux.dev>
> Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")
> Link: https://patch.msgid.link/20240903175141.4132898-1-sean.anderson@linux.dev
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> [ Adjusted to apply before dmaengine support ]
> Signed-off-by: Sean Anderson <sean.anderson@...ux.dev>
> ---
> This patch is adjusted to apply to v6.6 kernels and earlier, which do
> not contain commit 6a91b846af85 ("net: axienet: Introduce dmaengine
> support").

Applied to 6.6.y and 6.1.y, but nothing older as it didn't apply to
5.15.y :(

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ