All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: unregister cross-chip notifier after ds->ops->teardown
@ 2021-10-12 12:37 Vladimir Oltean
  2021-10-13 20:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Oltean @ 2021-10-12 12:37 UTC (permalink / raw)
  To: netdev, Jakub Kicinski, David S. Miller
  Cc: Florian Fainelli, Andrew Lunn, Vivien Didelot, Vladimir Oltean

To be symmetric with the error unwind path of dsa_switch_setup(), call
dsa_switch_unregister_notifier() after ds->ops->teardown.

The implication is that ds->ops->teardown cannot emit cross-chip
notifiers. For example, currently the dsa_tag_8021q_unregister() call
from sja1105_teardown() does not propagate to the entire tree due to
this reason. However I cannot find an actual issue caused by this,
observed using code inspection.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 net/dsa/dsa2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 58f7dce0652c..4f92b1042dd3 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -948,11 +948,11 @@ static void dsa_switch_teardown(struct dsa_switch *ds)
 		ds->slave_mii_bus = NULL;
 	}
 
-	dsa_switch_unregister_notifier(ds);
-
 	if (ds->ops->teardown)
 		ds->ops->teardown(ds);
 
+	dsa_switch_unregister_notifier(ds);
+
 	if (ds->devlink) {
 		list_for_each_entry(dp, &ds->dst->ports, list)
 			if (dp->ds == ds)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: dsa: unregister cross-chip notifier after ds->ops->teardown
  2021-10-12 12:37 [PATCH net-next] net: dsa: unregister cross-chip notifier after ds->ops->teardown Vladimir Oltean
@ 2021-10-13 20:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-13 20:40 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: netdev, kuba, davem, f.fainelli, andrew, vivien.didelot, olteanv

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 12 Oct 2021 15:37:35 +0300 you wrote:
> To be symmetric with the error unwind path of dsa_switch_setup(), call
> dsa_switch_unregister_notifier() after ds->ops->teardown.
> 
> The implication is that ds->ops->teardown cannot emit cross-chip
> notifiers. For example, currently the dsa_tag_8021q_unregister() call
> from sja1105_teardown() does not propagate to the entire tree due to
> this reason. However I cannot find an actual issue caused by this,
> observed using code inspection.
> 
> [...]

Here is the summary with links:
  - [net-next] net: dsa: unregister cross-chip notifier after ds->ops->teardown
    https://git.kernel.org/netdev/net-next/c/39e222bfd7f3

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-13 20:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 12:37 [PATCH net-next] net: dsa: unregister cross-chip notifier after ds->ops->teardown Vladimir Oltean
2021-10-13 20:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.