From: David Miller <davem@davemloft.net>
To: razor@blackwall.org
Cc: netdev@vger.kernel.org, jiri@resnulli.us, sfeldma@gmail.com,
roopa@cumulusnetworks.com, stephen@networkplumber.org,
bridge@lists.linux-foundation.org, nikolay@cumulusnetworks.com
Subject: Re: [PATCH net-next] bridge: fix gc_timer mod/del race condition
Date: Tue, 13 Oct 2015 04:52:16 -0700 (PDT) [thread overview]
Message-ID: <20151013.045216.838190689363270571.davem@davemloft.net> (raw)
In-Reply-To: <1444665355-28448-1-git-send-email-razor@blackwall.org>
From: Nikolay Aleksandrov <razor@blackwall.org>
Date: Mon, 12 Oct 2015 17:55:55 +0200
> From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
>
> commit c62987bbd8a1 ("bridge: push bridge setting ageing_time down to
> switchdev") introduced a timer race condition because the gc_timer can
> get rearmed after it's supposedly stopped and flushed in br_dev_delete()
> leading to a use of freed memory. So take rtnl to sync with bridge
> destruction when setting ageing_timer.
> Here's the trace reproduced with these two commands running in parallel:
> while :; do echo 10000 > /sys/class/net/br0/bridge/ageing_timer; done;
> while :; do brctl addbr br0; ip l set br0 up; ip l set br0 down;
> brctl delbr br0; done;
...
> Fixes: c62987bbd8a1 ("bridge: push bridge setting ageing_time down to switchdev")
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Applied, thanks.
prev parent reply other threads:[~2015-10-13 11:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 15:55 [PATCH net-next] bridge: fix gc_timer mod/del race condition Nikolay Aleksandrov
2015-10-12 17:19 ` Jiri Pirko
2015-10-13 6:24 ` Scott Feldman
2015-10-13 11:52 ` David Miller [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=20151013.045216.838190689363270571.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bridge@lists.linux-foundation.org \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=razor@blackwall.org \
--cc=roopa@cumulusnetworks.com \
--cc=sfeldma@gmail.com \
--cc=stephen@networkplumber.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