Commit 3cc270f7 authored by Ian Campbell's avatar Ian Campbell Committed by Greg Kroah-Hartman

xen/netfront: teardown the device before unregistering it.

[ Upstream commit 6bc96d04 ]

Fixes:
[   15.470311] WARNING: at /local/scratch/ianc/devel/kernels/linux/fs/sysfs/file.c:498 sysfs_attr_ns+0x95/0xa0()
[   15.470326] sysfs: kobject eth0 without dirent
[   15.470333] Modules linked in:
[   15.470342] Pid: 12, comm: xenwatch Not tainted 3.4.0-x86_32p-xenU #93
and
[    9.150554] BUG: unable to handle kernel paging request at 2b359000
[    9.150577] IP: [<c1279561>] linkwatch_do_dev+0x81/0xc0
[    9.150592] *pdpt = 000000002c3c9027 *pde = 0000000000000000
[    9.150604] Oops: 0002 [#1] SMP
[    9.150613] Modules linked in:

This is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675190Reported-by: default avatarGeorge Shuklin <george.shuklin@gmail.com>
Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
Tested-by: default avatarWilliam Dauchy <wdauchy@gmail.com>
Cc: stable@kernel.org
Cc: 675190@bugs.debian.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f7153a44
...@@ -1935,14 +1935,14 @@ static int __devexit xennet_remove(struct xenbus_device *dev) ...@@ -1935,14 +1935,14 @@ static int __devexit xennet_remove(struct xenbus_device *dev)
dev_dbg(&dev->dev, "%s\n", dev->nodename); dev_dbg(&dev->dev, "%s\n", dev->nodename);
unregister_netdev(info->netdev);
xennet_disconnect_backend(info); xennet_disconnect_backend(info);
del_timer_sync(&info->rx_refill_timer);
xennet_sysfs_delif(info->netdev); xennet_sysfs_delif(info->netdev);
unregister_netdev(info->netdev);
del_timer_sync(&info->rx_refill_timer);
free_percpu(info->stats); free_percpu(info->stats);
free_netdev(info->netdev); free_netdev(info->netdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment