* [PATCH] ipv6: Fix "waiting for %s to become free" hang
@ 2009-12-04 11:27 Krishna Kumar
2009-12-04 11:40 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Krishna Kumar @ 2009-12-04 11:27 UTC (permalink / raw)
To: davem; +Cc: netdev, Krishna Kumar
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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ipv6: Fix "waiting for %s to become free" hang
2009-12-04 11:27 [PATCH] ipv6: Fix "waiting for %s to become free" hang Krishna Kumar
@ 2009-12-04 11:40 ` Eric Dumazet
2009-12-04 12:15 ` Krishna Kumar2
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2009-12-04 11:40 UTC (permalink / raw)
To: Krishna Kumar; +Cc: davem, netdev
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ipv6: Fix "waiting for %s to become free" hang
2009-12-04 11:40 ` Eric Dumazet
@ 2009-12-04 12:15 ` Krishna Kumar2
0 siblings, 0 replies; 3+ messages in thread
From: Krishna Kumar2 @ 2009-12-04 12:15 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, netdev
> Eric Dumazet <eric.dumazet@gmail.com>
>
> Re: [PATCH] ipv6: Fix "waiting for %s to become free" hang
>
> 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.
Yes, you are right. I sent the patch on my memory of unregister_netdev,
which gets
the rtnl and drops it, and that would have caused this problem. Please drop
the patch.
thanks,
- KK
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-04 12:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-04 11:27 [PATCH] ipv6: Fix "waiting for %s to become free" hang Krishna Kumar
2009-12-04 11:40 ` Eric Dumazet
2009-12-04 12:15 ` Krishna Kumar2
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).