diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2012-06-25 22:48:41 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-07-04 05:44:31 +0100 |
commit | 91bdefe9f3accde9507907a42fd8200712639a7f (patch) | |
tree | 3cde8f4d16c685468a1a723398d5de13b25b0cf5 | |
parent | dd97160af2b4999b01284ea916e27e4eb1f0be22 (diff) | |
download | lwn-91bdefe9f3accde9507907a42fd8200712639a7f.tar.gz lwn-91bdefe9f3accde9507907a42fd8200712639a7f.zip |
xen/netfront: teardown the device before unregistering it.
commit 6bc96d047fe32d76ef79f3195c52a542edf7c705 upstream.
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=675190
Reported-by: George Shuklin <george.shuklin@gmail.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: William Dauchy <wdauchy@gmail.com>
Cc: 675190@bugs.debian.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/net/xen-netfront.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 226faab23603..fc3530841d7c 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1922,14 +1922,14 @@ static int __devexit xennet_remove(struct xenbus_device *dev) dev_dbg(&dev->dev, "%s\n", dev->nodename); - unregister_netdev(info->netdev); - xennet_disconnect_backend(info); - del_timer_sync(&info->rx_refill_timer); - xennet_sysfs_delif(info->netdev); + unregister_netdev(info->netdev); + + del_timer_sync(&info->rx_refill_timer); + free_percpu(info->stats); free_netdev(info->netdev); |