From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [RFC] [PATCH] xen/blkback: add locking in statistics sysfs show functions Date: Thu, 26 Apr 2012 22:24:56 -0400 Message-ID: <20120427022456.GA26931@phenom.dumpdata.com> References: <1334949673-25632-1-git-send-email-msw@amazon.com> <1334949673-25632-2-git-send-email-msw@amazon.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1334949673-25632-2-git-send-email-msw@amazon.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Matt Wilson Cc: Joe Jin , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, Apr 20, 2012 at 07:21:13PM +0000, Matt Wilson wrote: > This is a port of a patch in the XenoLinux 2.6.18 tree: > http://xenbits.xen.org/hg/linux-2.6.18-xen.hg/rev/f47c07325a56 > > Fix blkback sysfs race So with this patch I keep on getting this: [ 128.274290] switch: port 2(vif1.0) entered disabled state [ 128.855442] BUG: sleeping function called from invalid context at /home/konrad/ssd/linux/kernel/mutex.c:85 [ 128.855628] in_atomic(): 1, irqs_disabled(): 0, pid: 46, name: xenwatch [ 128.855757] Pid: 46, comm: xenwatch Tainted: G O 3.4.0-rc4upstream-00103-g7e4325c-dirty #1 [ 128.855917] Call Trace: [ 128.856062] [] __might_sleep+0xda/0x100 [ 128.856215] [] mutex_lock+0x27/0x50 [ 128.856351] [] sysfs_get_dirent+0x29/0x80 [ 128.856495] [] sysfs_remove_group+0x2b/0x100 [ 128.856626] [] xenvbd_sysfs_delif+0x20/0x50 [ 128.856756] [] xen_blkbk_remove+0xe8/0xf0 [ 128.856895] [] xenbus_dev_remove+0x38/0x70 [ 128.857041] [] __device_release_driver+0x61/0xc0 [ 128.857177] [] device_release_driver+0x28/0x40 [ 128.857323] [] bus_remove_device+0x106/0x140 [ 128.857459] [] device_del+0x118/0x1c0 [ 128.857580] [] device_unregister+0x11/0x20 [ 128.857712] [] frontend_changed+0xba/0x350 [ 128.857851] [] ? xen_irq_enable_direct_reloc+0x4/0x4 [ 128.857982] [] ? finish_task_switch+0x4d/0x100 [ 128.858106] [] xenbus_otherend_changed+0xa8/0xb0 [ 128.858236] [] ? _raw_spin_unlock_irqrestore+0x19/0x30 [ 128.858368] [] frontend_changed+0xb/0x10 [ 128.858522] [] xenwatch_thread+0xcb/0x190 [ 128.858655] [] ? wake_up_bit+0x40/0x40 [ 128.858801] [] ? xenbus_thread+0x320/0x320 [ 128.858965] [] kthread+0x96/0xa0 [ 128.859097] [] kernel_thread_helper+0x4/0x10 [ 128.859235] [] ? retint_restore_args+0x5/0x6 [ 128.859371] [] ? gs_change+0x13/0x13 [ 128.859542] BUG: scheduling while atomic: xenwatch/46/0x00000002 whenever a guest is powered off.