| To: | Krishna Kumar <krkumar@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] panic during unregister_netdevice() |
| From: | Stephen Hemminger <shemminger@xxxxxxxx> |
| Date: | Wed, 5 Nov 2003 16:30:25 -0800 |
| Cc: | davem@xxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <Pine.LNX.4.44.0311051558350.1359-100000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
| Organization: | Open Source Development Lab |
| References: | <Pine.LNX.4.44.0311051558350.1359-100000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
>
> diff -ruN linux-2.6.0-test9-bk9/net/core/dev.c
> linux-2.6.0-test9-bk9.new/net/core/dev.c
> --- linux-2.6.0-test9-bk9/net/core/dev.c 2003-11-05 15:43:21.000000000
> -0800
> +++ linux-2.6.0-test9-bk9.new/net/core/dev.c 2003-11-05 15:43:50.000000000
> -0800
> @@ -2749,8 +2749,10 @@
> rtnl_exlock();
>
> /* Rebroadcast unregister notification */
> + dev_hold(dev);
> notifier_call_chain(&netdev_chain,
> NETDEV_UNREGISTER, dev);
> + dev_put(dev);
>
> if (test_bit(__LINK_STATE_LINKWATCH_PENDING,
> &dev->state)) {
>
Hey, what if the dev refcount goes to zero before your dev_hold?
Actually this repeated notifier looks like it wouldn't work anyway.
Why would a protocol drop it's reference when notified a second time?
I would argue even running the loop once means some protocol is busted.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] panic during unregister_netdevice(), Krishna Kumar |
|---|---|
| Next by Date: | Re: [PATCH] panic during unregister_netdevice(), David S. Miller |
| Previous by Thread: | [PATCH] panic during unregister_netdevice(), Krishna Kumar |
| Next by Thread: | Re: [PATCH] panic during unregister_netdevice(), David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |