All of lore.kernel.org
 help / color / mirror / Atom feed
From: Moni Shoua <monis@Voltaire.COM>
To: Jay Vosburgh <fubar@us.ibm.com>
Cc: Olga Stern <olgas@voltaire.com>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH]  net/bonding: Don't destroy bonding master wehn unensalving with a sysfs command
Date: Wed, 25 Jun 2008 17:08:40 +0300	[thread overview]
Message-ID: <48625168.5090703@Voltaire.COM> (raw)
In-Reply-To: <485A74D1.10900@Voltaire.COM>

Moni Shoua wrote:
> It is wrong to destroy a bonding  master from a context that uses the sysfs of
>  that bond. When last IPoIB slave is unenslaved from by writing to a sysfs
>  file (for bond0 this would be /sys/class/net/bond0/bonding/slaves) the driver
>  tries to destroy the bond. This is wrong and can lead to a lockup or a crash.
>  This fix lets the bonding master stay and relies on the user to destroy the
>  bonding master if necessary (i.e. before module ib_ipoib is unloaded)
> 
> This patch affects only bonds of IPoIB slaves. Ethernet slaves stay unaffected.
> Signed-off-by: Moni Shoua <monis@voltaire.com>
> ---
>  drivers/net/bonding/bond_sysfs.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
> index 08f3d39..f66f590 100644
> --- a/drivers/net/bonding/bond_sysfs.c
> +++ b/drivers/net/bonding/bond_sysfs.c
> @@ -351,9 +351,6 @@ static ssize_t bonding_store_slaves(struct device *d,
>  		if (dev) {
>  			printk(KERN_INFO DRV_NAME ": %s: Removing slave %s\n",
>  				bond->dev->name, dev->name);
> -			if (bond->setup_by_slave)
> -				res = bond_release_and_destroy(bond->dev, dev);
> -			else
>  				res = bond_release(bond->dev, dev);
>  			if (res) {
>  				ret = res;
Hi Jay,
Could you please refer to this one?

      reply	other threads:[~2008-06-25 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-19 15:01 [PATCH] net/bonding: Don't destroy bonding master wehn unensalving with a sysfs command Moni Shoua
2008-06-25 14:08 ` Moni Shoua [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=48625168.5090703@Voltaire.COM \
    --to=monis@voltaire.com \
    --cc=fubar@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=olgas@voltaire.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.