From: Stephen Hemminger <stephen@networkplumber.org>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com,
bridge@lists.linux-foundation.org,
syzkaller-bugs@googlegroups.com, davem@davemloft.net
Subject: Re: [Bridge] [PATCH net v3] net: bridge: fix vlan stats use-after-free on destruction
Date: Wed, 20 May 2020 08:50:54 -0700 [thread overview]
Message-ID: <20200520085054.2031ad8a@hermes.lan> (raw)
In-Reply-To: <20181116165001.30896-1-nikolay@cumulusnetworks.com>
On Fri, 16 Nov 2018 18:50:01 +0200
Nikolay Aleksandrov <nikolay@cumulusnetworks.com> wrote:
> + if (v->priv_flags & BR_VLFLAG_PER_PORT_STATS)
> free_percpu(v->stats);
Why not not v->stats == NULL as a flag instead?
Then the fact that free_percpu(NULL) is a Nop would mean less code
in the bridge driver.
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <stephen@networkplumber.org>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com,
davem@davemloft.net, bridge@lists.linux-foundation.org,
syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH net v3] net: bridge: fix vlan stats use-after-free on destruction
Date: Wed, 20 May 2020 08:50:54 -0700 [thread overview]
Message-ID: <20200520085054.2031ad8a@hermes.lan> (raw)
In-Reply-To: <20181116165001.30896-1-nikolay@cumulusnetworks.com>
On Fri, 16 Nov 2018 18:50:01 +0200
Nikolay Aleksandrov <nikolay@cumulusnetworks.com> wrote:
> + if (v->priv_flags & BR_VLFLAG_PER_PORT_STATS)
> free_percpu(v->stats);
Why not not v->stats == NULL as a flag instead?
Then the fact that free_percpu(NULL) is a Nop would mean less code
in the bridge driver.
next prev parent reply other threads:[~2020-05-20 15:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-12 5:51 [Bridge] KASAN: use-after-free Read in nbp_vlan_rcu_free syzbot
2018-11-12 5:51 ` syzbot
2018-11-12 8:32 ` [Bridge] " nikolay
2018-11-12 8:32 ` nikolay
2018-11-13 1:01 ` [Bridge] [PATCH net] net: bridge: fix per-port vlan stats use-after-free on destruction Nikolay Aleksandrov
2018-11-13 1:01 ` Nikolay Aleksandrov
2018-11-14 17:08 ` [Bridge] " Nikolay Aleksandrov
2018-11-14 17:08 ` Nikolay Aleksandrov
2018-11-14 17:27 ` [Bridge] [PATCH net v2] net: bridge: fix " Nikolay Aleksandrov
2018-11-14 17:27 ` Nikolay Aleksandrov
2018-11-16 16:50 ` [Bridge] [PATCH net v3] " Nikolay Aleksandrov
2018-11-16 16:50 ` Nikolay Aleksandrov
2018-11-18 5:39 ` [Bridge] " David Miller
2018-11-18 5:39 ` David Miller
2020-04-24 0:05 ` [Bridge] " Stephen Hemminger
2020-04-24 0:05 ` Stephen Hemminger
2020-04-24 7:26 ` [Bridge] " Nikolay Aleksandrov
2020-04-24 7:26 ` Nikolay Aleksandrov
2020-05-20 15:50 ` Stephen Hemminger [this message]
2020-05-20 15:50 ` Stephen Hemminger
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=20200520085054.2031ad8a@hermes.lan \
--to=stephen@networkplumber.org \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=roopa@cumulusnetworks.com \
--cc=syzkaller-bugs@googlegroups.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 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.