From: Veaceslav Falico <vfalico@redhat.com>
To: Nikolay Aleksandrov <nikolay@redhat.com>
Cc: netdev@vger.kernel.org, andy@greyhouse.net, fubar@us.ibm.com,
davem@davemloft.net
Subject: Re: [PATCH 2/2] bonding: fix bonding_masters race condition in bond unloading
Date: Sat, 6 Apr 2013 15:50:20 +0200 [thread overview]
Message-ID: <20130406135020.GA18246@redhat.com> (raw)
In-Reply-To: <1365245678-4455-2-git-send-email-nikolay@redhat.com>
On Sat, Apr 06, 2013 at 12:54:38PM +0200, Nikolay Aleksandrov wrote:
>While the bonding module is unloading, it is considered that after
>rtnl_link_unregister all bond devices are destroyed but since no
>synchronization mechanism exists, a new bond device can be created
>via bonding_masters before unregister_pernet_subsys which would
>lead to multiple problems (e.g. NULL pointer dereference, wrong RIP,
>list corruption).
>
>This patch fixes the issue by removing any bond devices left in the
>netns after bonding_masters is removed from sysfs.
>
>Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
>---
> drivers/net/bonding/bond_main.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
I'm still thinking that's it's not the best way of fixing it
(remove_devices(); remove_sysfs(); remove_devices()) - but given that I
can't come up with anything better and my first fix didn't actually work -
I'm ok with your patch.
next prev parent reply other threads:[~2013-04-06 13:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-06 10:54 [PATCH 1/2] Revert "bonding: remove sysfs before removing devices" Nikolay Aleksandrov
2013-04-06 10:54 ` [PATCH 2/2] bonding: fix bonding_masters race condition in bond unloading Nikolay Aleksandrov
2013-04-06 13:50 ` Veaceslav Falico [this message]
2013-04-08 8:30 ` Veaceslav Falico
2013-04-08 9:15 ` Nikolay Aleksandrov
2013-04-08 10:08 ` Veaceslav Falico
2013-04-08 9:24 ` Veaceslav Falico
2013-04-08 20:45 ` David Miller
2013-04-08 20:45 ` [PATCH 1/2] Revert "bonding: remove sysfs before removing devices" David Miller
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=20130406135020.GA18246@redhat.com \
--to=vfalico@redhat.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@redhat.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).