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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241219192123.4a5f6e75@kernel.org>
Date: Thu, 19 Dec 2024 19:21:23 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Shinas Rasheed <srasheed@...vell.com>
Cc: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
 <hgani@...vell.com>, <sedara@...vell.com>, <vimleshk@...vell.com>,
 <thaller@...hat.com>, <wizhao@...hat.com>, <kheib@...hat.com>,
 <konguyen@...hat.com>, <horms@...nel.org>, <einstein.xue@...axg.com>,
 Veerasenareddy Burru <vburru@...vell.com>, Andrew Lunn
 <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, "Paolo Abeni" <pabeni@...hat.com>, Satananda
 Burla <sburla@...vell.com>, "Abhijit Ayarekar" <aayarekar@...vell.com>
Subject: Re: [PATCH net v3 1/4] octeon_ep: fix race conditions in
 ndo_get_stats64

On Wed, 18 Dec 2024 03:51:08 -0800 Shinas Rasheed wrote:
> ndo_get_stats64() can race with ndo_stop(), which frees input and
> output queue resources. Call synchronize_net() to avoid such races.

synchronize_rcu() acts as a barrier.
What are the two operations you are separating with this barrier?

> diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> index 549436efc204..941bbaaa67b5 100644
> --- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> @@ -757,6 +757,7 @@ static int octep_stop(struct net_device *netdev)
>  {
>  	struct octep_device *oct = netdev_priv(netdev);
>  
> +	synchronize_net();
>  	netdev_info(netdev, "Stopping the device ...\n");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ