netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Menglong Dong <menglong8.dong@gmail.com>
To: Nikolay Aleksandrov <nikolay@nvidia.com>
Cc: Roopa Prabhu <roopa@nvidia.com>,
	"bridge@lists.linux-foundation.org" 
	<bridge@lists.linux-foundation.org>,
	"dong.menglong@zte.com.cn" <dong.menglong@zte.com.cn>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: bridge: disable multicast while delete bridge
Date: Wed, 4 Nov 2020 22:14:35 +0800	[thread overview]
Message-ID: <CADxym3bWqziz1-rHEZXC10JBgfO0Jc5S9nWEW2s3G09VvWioTA@mail.gmail.com> (raw)
In-Reply-To: <067c94269abed15f777ac078a216be314c935fd5.camel@nvidia.com>

Dear Nik,

On Wed, Nov 4, 2020 at 12:26 AM Nikolay Aleksandrov <nikolay@nvidia.com> wrote:
>
> On Mon, 2020-11-02 at 22:38 +0800, Menglong Dong wrote:
> > From: Menglong Dong <dong.menglong@zte.com.cn>
> >
> > This commit seems make no sense, as bridge is destroyed when
> > br_multicast_dev_del is called.
> >
> > In commit b1b9d366028f
> > ("bridge: move bridge multicast cleanup to ndo_uninit"), Xin Long
> > fixed the use-after-free panic in br_multicast_group_expired by
> > moving br_multicast_dev_del to ndo_uninit. However, that patch is
> > not applied to 4.4.X, and the bug exists.
> >
> > Fix that bug by disabling multicast in br_multicast_dev_del for
> > 4.4.X, and there is no harm for other branches.
> >
> > Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
> > ---
> >  net/bridge/br_multicast.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
> > index eae898c3cff7..9992fdff2951 100644
> > --- a/net/bridge/br_multicast.c
> > +++ b/net/bridge/br_multicast.c
> > @@ -3369,6 +3369,7 @@ void br_multicast_dev_del(struct net_bridge *br)
> >       hlist_for_each_entry_safe(mp, tmp, &br->mdb_list, mdb_node)
> >               br_multicast_del_mdb_entry(mp);
> >       hlist_move_list(&br->mcast_gc_list, &deleted_head);
> > +     br_opt_toggle(br, BROPT_MULTICAST_ENABLED, false);
> >       spin_unlock_bh(&br->multicast_lock);
> >
> >       br_multicast_gc(&deleted_head);
>
> This doesn't make any sense. It doesn't fix anything.
> If 4.4 has a problem then the relevant patches should get backported to it.
> We don't add random changes to fix older releases.
>
> Cheers,
>  Nik
>
> Nacked-by: Nikolay Aleksandrov <nikolay@nvidia.com>

Thanks for your patient explanation, and I see it now~

Cheers,
Menglong Dong

      reply	other threads:[~2020-11-04 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 14:38 [PATCH] net: bridge: disable multicast while delete bridge Menglong Dong
2020-11-03 16:26 ` Nikolay Aleksandrov
2020-11-04 14:14   ` Menglong Dong [this message]

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=CADxym3bWqziz1-rHEZXC10JBgfO0Jc5S9nWEW2s3G09VvWioTA@mail.gmail.com \
    --to=menglong8.dong@gmail.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=dong.menglong@zte.com.cn \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@nvidia.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).