netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: Tobias Waldekranz <tobias@waldekranz.com>
Cc: "Vladimir Oltean" <vladimir.oltean@nxp.com>,
	netdev@vger.kernel.org, "Andrew Lunn" <andrew@lunn.ch>,
	"Jan Bětík" <hagrid@svine.us>
Subject: Re: [PATCH net] net: dsa: fix panic when port leaves a bridge
Date: Mon, 14 Mar 2022 17:05:29 +0100	[thread overview]
Message-ID: <20220314170529.2b71978d@dellmb> (raw)
In-Reply-To: <87tuc0lelc.fsf@waldekranz.com>

On Mon, 14 Mar 2022 16:48:47 +0100
Tobias Waldekranz <tobias@waldekranz.com> wrote:

> On Mon, Mar 14, 2022 at 16:34, Marek Behún <kabel@kernel.org> wrote:
> > Fix a data structure breaking / NULL-pointer dereference in
> > dsa_switch_bridge_leave().
> >
> > When a DSA port leaves a bridge, dsa_switch_bridge_leave() is called by
> > notifier for every DSA switch that contains ports that are in the
> > bridge.
> >
> > But the part of the code that unsets vlan_filtering expects that the ds
> > argument refers to the same switch that contains the leaving port.
> >
> > This leads to various problems, including a NULL pointer dereference,
> > which was observed on Turris MOX with 2 switches (one with 8 user ports
> > and another with 4 user ports).
> >
> > Thus we need to move the vlan_filtering change code to the non-crosschip
> > branch.
> >
> > Fixes: d371b7c92d190 ("net: dsa: Unset vlan_filtering when ports leave the bridge")
> > Reported-by: Jan Bětík <hagrid@svine.us>
> > Signed-off-by: Marek Behún <kabel@kernel.org>
> > ---  
> 
> Hi Marek,
> 
> I ran into the same issue a while back and fixed it (or at least thought
> I did) in 108dc8741c20. Has that been applied to your tree? Maybe I
> missed some tag that caused it to not be back-ported?

It wasn't applied because I was working with net, not net-next.

Very well. We will need to get this backported to stable, though.

Marek

  reply	other threads:[~2022-03-14 16:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 15:34 [PATCH net] net: dsa: fix panic when port leaves a bridge Marek Behún
2022-03-14 15:41 ` Vladimir Oltean
2022-03-14 15:45 ` Vladimir Oltean
2022-03-14 16:06   ` Marek Behún
2022-03-14 15:48 ` Tobias Waldekranz
2022-03-14 16:05   ` Marek Behún [this message]
2022-03-14 16:17     ` Vladimir Oltean
2022-03-14 16:34       ` Marek Behún
2022-03-14 16:42         ` Vladimir Oltean
2022-03-15  0:04           ` Jakub Kicinski
2022-03-14 16:47   ` Marek Behún
2022-03-14 18:09     ` Marek Behún
2022-03-14 18:19       ` Tobias Waldekranz
2022-03-14 19:27         ` Marek Behún

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=20220314170529.2b71978d@dellmb \
    --to=kabel@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=hagrid@svine.us \
    --cc=netdev@vger.kernel.org \
    --cc=tobias@waldekranz.com \
    --cc=vladimir.oltean@nxp.com \
    /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;
as well as URLs for NNTP newsgroup(s).