netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: vfalico@redhat.com
Cc: netdev@vger.kernel.org, fubar@us.ibm.com, andy@greyhouse.net,
	nikolay@redhat.com
Subject: Re: [PATCH] bonding: remove sysfs before removing devices
Date: Fri, 05 Apr 2013 00:50:15 -0400 (EDT)	[thread overview]
Message-ID: <20130405.005015.1039997502651377576.davem@davemloft.net> (raw)
In-Reply-To: <1365003993-13181-1-git-send-email-vfalico@redhat.com>

From: Veaceslav Falico <vfalico@redhat.com>
Date: Wed,  3 Apr 2013 17:46:33 +0200

> We have a race condition if we try to rmmod bonding and simultaneously add
> a bond master through sysfs. In bonding_exit() we first remove the devices
> (through rtnl_link_unregister() ) and only after that we remove the sysfs.
> If we manage to add a device through sysfs after that the devices were
> removed - we'll end up with that device/sysfs structure and with the module
> unloaded.
> 
> Fix this by first removing the sysfs and only after that calling
> rtnl_link_unregister().
> 
> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>

Applied and queued up for -stable, thanks!

  reply	other threads:[~2013-04-05  4:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 15:46 [PATCH] bonding: remove sysfs before removing devices Veaceslav Falico
2013-04-05  4:50 ` David Miller [this message]
2013-04-05 22:15 ` Nikolay Aleksandrov
2013-04-05 23:21   ` Veaceslav Falico
2013-04-05 23:29     ` Nikolay Aleksandrov
2013-04-06  1:49       ` Veaceslav Falico
2013-04-06  7:38         ` Nikolay Aleksandrov

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=20130405.005015.1039997502651377576.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andy@greyhouse.net \
    --cc=fubar@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@redhat.com \
    --cc=vfalico@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).