[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1305034619.2614.37.camel@edumazet-laptop>
Date: Tue, 10 May 2011 15:36:59 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Frank Blaschka <blaschka@...ux.vnet.ibm.com>,
David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, ELELUECK@...ibm.com,
Octavian Purdila <opurdila@...acom.com>
Subject: Re: Fw: oops during unregister_netdevice interface enslaved to
bond - regression
Le mardi 10 mai 2011 à 15:14 +0200, Frank Blaschka a écrit :
> I just checked todays net-next tree, problem is still there.
> I don't have an x86 box, but I was able to reproduce the problem
> with the dummy device (on s/390)
>
> # modprobe bonding
> # modprobe dummy
> # ifconfig bond0 up
> # ifenslave bond0 dummy0
> # rmmod dummy
Here is the patch to fix this problem
Thanks again for your help.
[PATCH net-2.6] net: dev_close() should check IFF_UP
Commit 443457242beb (factorize sync-rcu call in
unregister_netdevice_many) mistakenly removed one test from dev_close()
Following actions trigger a BUG :
modprobe bonding
modprobe dummy
ifconfig bond0 up
ifenslave bond0 dummy0
rmmod dummy
dev_close() must not close a non IFF_UP device.
With help from Frank Blaschka and Einar EL Lueck
Reported-by: Frank Blaschka <blaschka@...ux.vnet.ibm.com>
Reported-by: Einar EL Lueck <ELELUECK@...ibm.com>
Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
CC: Octavian Purdila <opurdila@...acom.com>
---
net/core/dev.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 856b6ee..9200944 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1284,11 +1284,13 @@ static int dev_close_many(struct list_head *head)
*/
int dev_close(struct net_device *dev)
{
- LIST_HEAD(single);
+ if (dev->flags & IFF_UP) {
+ LIST_HEAD(single);
- list_add(&dev->unreg_list, &single);
- dev_close_many(&single);
- list_del(&single);
+ list_add(&dev->unreg_list, &single);
+ dev_close_many(&single);
+ list_del(&single);
+ }
return 0;
}
EXPORT_SYMBOL(dev_close);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists