From: Gur Stavi <gur.stavi@huawei.com>
To: <alexander.sverdlin@siemens.com>
Cc: <Mark-MC.Lee@mediatek.com>, <UNGLinuxDriver@microchip.com>,
<alexandre.belloni@bootlin.com>, <andrew@lunn.ch>,
<angelogioacchino.delregno@collabora.com>,
<arinc.unal@arinc9.com>, <bcm-kernel-feedback-list@broadcom.com>,
<bridge@lists.linux.dev>, <claudiu.manoil@nxp.com>,
<daniel@makrotopia.org>, <davem@davemloft.net>,
<dqfext@gmail.com>, <edumazet@google.com>, <f.fainelli@gmail.com>,
<kuba@kernel.org>, <linux-mediatek@lists.infradead.org>,
<lorenzo@kernel.org>, <matthias.bgg@gmail.com>, <nbd@nbd.name>,
<netdev@vger.kernel.org>, <olteanv@gmail.com>,
<pabeni@redhat.com>, <razor@blackwall.org>, <roopa@nvidia.com>,
<sean.wang@mediatek.com>, <stable@vger.kernel.org>
Subject: [PATCH 1/2] net: dsa: RCU-protect dsa_ptr in struct net_device
Date: Tue, 17 Sep 2024 11:10:56 +0300 [thread overview]
Message-ID: <20240917081056.1644806-1-gur.stavi@huawei.com> (raw)
In-Reply-To: <20240910130321.337154-2-alexander.sverdlin@siemens.com>
> @@ -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?
next prev parent reply other threads:[~2024-09-17 8:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 13:03 [PATCH 0/2] net: dsa: RCU-protect dsa_ptr in struct net_device A. Sverdlin
2024-09-10 13:03 ` [PATCH 1/2] " A. Sverdlin
2024-09-10 17:40 ` Florian Fainelli
2024-09-10 20:40 ` Sverdlin, Alexander
2024-09-13 19:03 ` Vladimir Oltean
2024-09-13 19:27 ` Andrew Lunn
2024-09-14 5:56 ` Greg KH
2024-09-17 8:10 ` Gur Stavi [this message]
2024-09-17 8:25 ` Sverdlin, Alexander
2024-09-17 10:30 ` Gur Stavi
2024-09-17 11:08 ` Sverdlin, Alexander
2024-09-11 2:19 ` [PATCH 0/2] " Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240917081056.1644806-1-gur.stavi@huawei.com \
--to=gur.stavi@huawei.com \
--cc=Mark-MC.Lee@mediatek.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexander.sverdlin@siemens.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arinc.unal@arinc9.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bridge@lists.linux.dev \
--cc=claudiu.manoil@nxp.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.com \
--cc=sean.wang@mediatek.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox