All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Krishna Kumar <krkumar2@in.ibm.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: Fix "waiting for %s to become free" hang
Date: Fri, 04 Dec 2009 12:40:58 +0100	[thread overview]
Message-ID: <4B18F54A.8000106@gmail.com> (raw)
In-Reply-To: <20091204112734.24535.86096.sendpatchset@localhost.localdomain>

Krishna Kumar a écrit :
> From: Krishna Kumar <krkumar2@in.ibm.com>
> 
> (From code-walkthrough, and untested)
> 
> Fix "waiting for %s to become free" hang. dev has an
> extra hold (by ip6mr_reg_vif) which was not dropped
> before calling unregister_netdevice.
> 
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
> ---
>  net/ipv6/ip6mr.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -ruNp org/net/ipv6/ip6mr.c new/net/ipv6/ip6mr.c
> --- org/net/ipv6/ip6mr.c	2009-12-04 16:08:07.000000000 +0530
> +++ new/net/ipv6/ip6mr.c	2009-12-04 16:09:56.000000000 +0530
> @@ -648,8 +648,8 @@ static int mif6_add(struct net *net, str
>  			return -ENOBUFS;
>  		err = dev_set_allmulti(dev, 1);
>  		if (err) {
> -			unregister_netdevice(dev);
>  			dev_put(dev);
> +			unregister_netdevice(dev);
>  			return err;
>  		}
>  		break;

This changes nothing, since we hold rtnl at this point.

unregister_netdevice() only queues the device (net_set_todo()) in a list.

And we process this list later, when renl_unlock() is finally called.


  reply	other threads:[~2009-12-04 11:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 11:27 [PATCH] ipv6: Fix "waiting for %s to become free" hang Krishna Kumar
2009-12-04 11:40 ` Eric Dumazet [this message]
2009-12-04 12:15   ` Krishna Kumar2

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=4B18F54A.8000106@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=krkumar2@in.ibm.com \
    --cc=netdev@vger.kernel.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 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.