On Wed, 2012-05-30 at 17:53 +0400, George Shuklin wrote: > [ 280.608438] BUG: unable to handle kernel paging request at 27c97000 > [ 280.608448] IP: [<c1229e86>] linkwatch_do_dev+0x8e/0x94 > [ 280.608460] *pdpt = 0000000002a8a027 *pde = 0000000000000000 > [ 280.608470] Oops: 0002 [#1] SMP Thanks, I think I know what's going on here (patch attached) the ordering of the teardown in xennet_remove looks a bit wonky for me. In particular it unregisters the netdev before brining the carrier down and before unregistering the sysfs files, both of which seem wrong. I actually saw a different backtrace from each of those, the one above is due to unregistering before bringing the carrier down. I still need to properly test (and understand) the fix. I just checked Squeeze and it is fine so I'll need to track it back to see where it came in for stable@ purposes. I'm on training tomorrow but hopefully on Friday I'll send a patch to netdev@. Cheers, Ian. -- Ian Campbell Paranoia is heightened awareness.
From 7579a7cd48154e6374d8543448a53018b25266b0 Mon Sep 17 00:00:00 2001 From: Ian Campbell <ian.campbell@citrix.com> Date: Wed, 30 May 2012 17:19:03 +0100 Subject: [PATCH] xen/netfront: teardown the device before unregistering it. 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: Reported-by: George Shuklin <george.shuklin@gmail.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: stable@kernel.org --- 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 0ebbb19..796afbf 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1935,14 +1935,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); -- 1.7.2.5
Attachment:
signature.asc
Description: This is a digitally signed message part