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: <20240917081056.1644806-1-gur.stavi@huawei.com>
Date: Tue, 17 Sep 2024 11:10:56 +0300
From: Gur Stavi <gur.stavi@...wei.com>
To: <alexander.sverdlin@...mens.com>
CC: <Mark-MC.Lee@...iatek.com>, <UNGLinuxDriver@...rochip.com>,
	<alexandre.belloni@...tlin.com>, <andrew@...n.ch>,
	<angelogioacchino.delregno@...labora.com>, <arinc.unal@...nc9.com>,
	<bcm-kernel-feedback-list@...adcom.com>, <bridge@...ts.linux.dev>,
	<claudiu.manoil@....com>, <daniel@...rotopia.org>, <davem@...emloft.net>,
	<dqfext@...il.com>, <edumazet@...gle.com>, <f.fainelli@...il.com>,
	<kuba@...nel.org>, <linux-mediatek@...ts.infradead.org>,
	<lorenzo@...nel.org>, <matthias.bgg@...il.com>, <nbd@....name>,
	<netdev@...r.kernel.org>, <olteanv@...il.com>, <pabeni@...hat.com>,
	<razor@...ckwall.org>, <roopa@...dia.com>, <sean.wang@...iatek.com>,
	<stable@...r.kernel.org>
Subject: [PATCH 1/2] net: dsa: RCU-protect dsa_ptr in struct net_device

> @@ -1594,10 +1592,11 @@ void dsa_switch_shutdown(struct dsa_switch *ds)
>  	}
>
>  	/* Disconnect from further netdevice notifiers on the conduit,
> -	 * since netdev_uses_dsa() will now return false.
> +	 * from now on, netdev_uses_dsa_currently() will return false.
>  	 */
>  	dsa_switch_for_each_cpu_port(dp, ds)
> -		dp->conduit->dsa_ptr = NULL;
> +		rcu_assign_pointer(dp->conduit->dsa_ptr, NULL);
> +	synchronize_rcu();
>
>  	rtnl_unlock();
>  out:

Hi, I am a newbie here. Thanks for the opportunity for learning more
about rcu.
Wouldn't it make more sense to call synchronize_rcu after rtnl_unlock?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ