Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753950Ab0DNGP6 (ORCPT ); Wed, 14 Apr 2010 02:15:58 -0400 Received: from cantor.suse.de ([195.135.220.2]:34621 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753462Ab0DNGP4 (ORCPT ); Wed, 14 Apr 2010 02:15:56 -0400 Date: Wed, 14 Apr 2010 08:15:46 +0200 Message-ID: From: Takashi Iwai To: Richard Zidlicky Cc: Andrew Morton , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: usb-sound circular locking again? In-Reply-To: <20100413203039.GC8468@linux-m68k.org> References: <20091206141419.GA6195@linux-m68k.org> <20091207143057.53c6a362.akpm@linux-foundation.org> <20091208002353.GA30011@linux-m68k.org> <20091207164826.eb2bbc48.akpm@linux-foundation.org> <20100413203039.GC8468@linux-m68k.org> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 14210 Lines: 178 At Tue, 13 Apr 2010 22:30:39 +0200, Richard Zidlicky wrote: > > Hi, > > is this the same old issue? I think so. It appears relatively new since a sysfs lockdep check was introduced. thanks, Takashi > Any way to fix it? Seeing it triggered in a sync > syscall does not make me comfortable. > > Apr 13 02:01:36 localhost kernel: [ 8569.449882] PM: Syncing filesystems ... > Apr 13 02:01:36 localhost kernel: [ 8569.449998] ======================================================= > Apr 13 02:01:36 localhost kernel: [ 8569.450049] [ INFO: possible circular locking dependency detected ] > Apr 13 02:01:36 localhost kernel: [ 8569.450078] 2.6.33.2v2 #4 > Apr 13 02:01:36 localhost kernel: [ 8569.450101] ------------------------------------------------------- > Apr 13 02:01:36 localhost kernel: [ 8569.450130] pm-hibernate/17348 is trying to acquire lock: > Apr 13 02:01:36 localhost kernel: [ 8569.450158] (mutex){+.+...}, at: [] sync_filesystems+0x14/0xd6 > Apr 13 02:01:36 localhost kernel: [ 8569.450252] > Apr 13 02:01:36 localhost kernel: [ 8569.450253] but task is already holding lock: > Apr 13 02:01:36 localhost kernel: [ 8569.450266] (pm_mutex){+.+.+.}, at: [] hibernate+0x13/0x18d > Apr 13 02:01:36 localhost kernel: [ 8569.450266] > Apr 13 02:01:36 localhost kernel: [ 8569.450266] which lock already depends on the new lock. > Apr 13 02:01:36 localhost kernel: [ 8569.450266] > Apr 13 02:01:36 localhost kernel: [ 8569.450266] > Apr 13 02:01:36 localhost kernel: [ 8569.450266] the existing dependency chain (in reverse order) is: > Apr 13 02:01:36 localhost kernel: [ 8569.450266] > Apr 13 02:01:36 localhost kernel: [ 8569.450266] -> #6 (pm_mutex){+.+.+.}: > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] __lock_acquire+0xa2d/0xbb7 > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] lock_acquire+0x94/0xb1 > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] __mutex_lock_common+0x35/0x2f3 > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] mutex_lock_nested+0x30/0x38 > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] hibernate+0x13/0x18d > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] state_store+0x56/0xa8 > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] kobj_attr_store+0x1a/0x22 > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] sysfs_write_file+0xb9/0xe4 > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] vfs_write+0x84/0xdf > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] sys_write+0x3b/0x60 > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] syscall_call+0x7/0xb > Apr 13 02:01:36 localhost kernel: [ 8569.450266] > Apr 13 02:01:36 localhost kernel: [ 8569.450266] -> #5 (s_active){++++.+}: > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] __lock_acquire+0xa2d/0xbb7 > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] lock_acquire+0x94/0xb1 > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] sysfs_addrm_finish+0x89/0xde > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] sysfs_hash_and_remove+0x3d/0x4f > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] sysfs_remove_group+0x74/0xa3 > Apr 13 02:01:36 localhost kernel: [ 8569.450266] [] dpm_sysfs_remove+0x10/0x12 > Apr 13 09:39:32 localhost kernel: [ 8569.450266] [] device_del+0x33/0x154 > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] device_unregister+0x28/0x4b > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] usb_remove_ep_devs+0x15/0x1f > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] remove_intf_ep_devs+0x21/0x32 > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] usb_set_interface+0x18c/0x22c > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] snd_usb_capture_close+0x26/0x3f [snd_usb_audio] > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] snd_pcm_release_substream+0x3d/0x66 [snd_pcm] > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] snd_pcm_release+0x5c/0x9e [snd_pcm] > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] __fput+0xf0/0x187 > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] fput+0x19/0x1b > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] remove_vma+0x3e/0x5d > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] do_munmap+0x23c/0x259 > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] sys_munmap+0x30/0x3f > Apr 13 09:39:34 localhost kernel: [ 8569.450266] [] syscall_call+0x7/0xb > Apr 13 09:39:34 localhost kernel: [ 8569.450266] > Apr 13 09:39:34 localhost kernel: [ 8569.450266] -> #4 (&pcm->open_mutex){+.+.+.}: > Apr 13 09:39:34 localhost kernel: [ 8569.454127] [] __lock_acquire+0xa2d/0xbb7 > Apr 13 09:39:34 localhost kernel: [ 8569.454127] [] lock_acquire+0x94/0xb1 > Apr 13 09:39:34 localhost kernel: [ 8569.454127] [] __mutex_lock_common+0x35/0x2f3 > Apr 13 09:39:34 localhost kernel: [ 8569.454127] [] mutex_lock_nested+0x30/0x38 > Apr 13 09:39:34 localhost kernel: [ 8569.454127] [] snd_pcm_release+0x55/0x9e [snd_pcm] > Apr 13 09:39:34 localhost kernel: [ 8569.454127] [] __fput+0xf0/0x187 > Apr 13 09:39:34 localhost kernel: [ 8569.454127] [] fput+0x19/0x1b > Apr 13 09:39:34 localhost kernel: [ 8569.454127] [] remove_vma+0x3e/0x5d > Apr 13 09:39:34 localhost kernel: [ 8569.454127] [] do_munmap+0x23c/0x259 > Apr 13 09:39:34 localhost kernel: [ 8569.454127] [] sys_munmap+0x30/0x3f > Apr 13 09:39:34 localhost kernel: [ 8569.455127] [] syscall_call+0x7/0xb > Apr 13 09:39:34 localhost kernel: [ 8569.455127] > Apr 13 09:39:34 localhost kernel: [ 8569.455127] -> #3 (&mm->mmap_sem){++++++}: > Apr 13 09:39:34 localhost kernel: [ 8569.455127] [] __lock_acquire+0xa2d/0xbb7 > Apr 13 09:39:34 localhost kernel: [ 8569.455127] [] lock_acquire+0x94/0xb1 > Apr 13 09:39:34 localhost kernel: [ 8569.455127] [] might_fault+0x64/0x81 > Apr 13 09:39:34 localhost kernel: [ 8569.455127] [] copy_to_user+0x2c/0xfc > Apr 13 09:39:34 localhost kernel: [ 8569.455127] [] filldir64+0x97/0xcd > Apr 13 09:39:34 localhost kernel: [ 8569.455127] [] dcache_readdir+0x5a/0x1af > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] vfs_readdir+0x68/0x94 > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] sys_getdents64+0x63/0xa0 > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] syscall_call+0x7/0xb > Apr 13 09:39:34 localhost kernel: [ 8569.456129] > Apr 13 09:39:34 localhost kernel: [ 8569.456129] -> #2 (&sb->s_type->i_mutex_key#3){+.+.+.}: > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] __lock_acquire+0xa2d/0xbb7 > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] lock_acquire+0x94/0xb1 > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] __mutex_lock_common+0x35/0x2f3 > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] mutex_lock_nested+0x30/0x38 > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] devpts_get_sb+0x1c0/0x29f > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] vfs_kern_mount+0x86/0x11f > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] do_kern_mount+0x32/0xbe > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] do_mount+0x671/0x6d0 > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] sys_mount+0x61/0x8f > Apr 13 09:39:34 localhost kernel: [ 8569.456129] [] syscall_call+0x7/0xb > Apr 13 09:39:34 localhost kernel: [ 8569.456129] > Apr 13 09:39:34 localhost kernel: [ 8569.456129] -> #1 (&type->s_umount_key#19){++++..}: > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] __lock_acquire+0xa2d/0xbb7 > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] lock_acquire+0x94/0xb1 > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] down_read+0x31/0x45 > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] sync_filesystems+0x73/0xd6 > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] sys_sync+0x11/0x2d > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] syscall_call+0x7/0xb > Apr 13 09:39:34 localhost kernel: [ 8569.458127] > Apr 13 09:39:34 localhost kernel: [ 8569.458127] -> #0 (mutex){+.+...}: > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] __lock_acquire+0x93a/0xbb7 > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] lock_acquire+0x94/0xb1 > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] __mutex_lock_common+0x35/0x2f3 > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] mutex_lock_nested+0x30/0x38 > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] sync_filesystems+0x14/0xd6 > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] sys_sync+0x11/0x2d > Apr 13 09:39:34 localhost kernel: [ 8569.458127] [] hibernate+0x7d/0x18d > Apr 13 09:39:34 localhost kernel: [ 8569.459761] [] state_store+0x56/0xa8 > Apr 13 09:39:34 localhost kernel: [ 8569.459761] [] kobj_attr_store+0x1a/0x22 > Apr 13 09:39:34 localhost kernel: [ 8569.459761] [] sysfs_write_file+0xb9/0xe4 > Apr 13 09:39:34 localhost kernel: [ 8569.459761] [] vfs_write+0x84/0xdf > Apr 13 09:39:34 localhost kernel: [ 8569.460128] [] sys_write+0x3b/0x60 > Apr 13 09:39:34 localhost kernel: [ 8569.460128] [] syscall_call+0x7/0xb > Apr 13 09:39:34 localhost kernel: [ 8569.460128] > Apr 13 09:39:34 localhost kernel: [ 8569.460128] other info that might help us debug this: > Apr 13 09:39:34 localhost kernel: [ 8569.460128] > Apr 13 09:39:34 localhost kernel: [ 8569.460128] 4 locks held by pm-hibernate/17348: > Apr 13 09:39:34 localhost kernel: [ 8569.460128] #0: (&buffer->mutex){+.+.+.}, at: [] sysfs_write_file+0x25/0xe4 > Apr 13 09:39:34 localhost kernel: [ 8569.460128] #1: (s_active){++++.+}, at: [] sysfs_get_active_two+0x16/0x36 > Apr 13 09:39:34 localhost kernel: [ 8569.461127] #2: (s_active){++++.+}, at: [] sysfs_get_active_two+0x21/0x36 > Apr 13 09:39:34 localhost kernel: [ 8569.461127] #3: (pm_mutex){+.+.+.}, at: [] hibernate+0x13/0x18d > Apr 13 09:39:34 localhost kernel: [ 8569.461127] > Apr 13 09:39:34 localhost kernel: [ 8569.461127] stack backtrace: > Apr 13 09:39:34 localhost kernel: [ 8569.461127] Pid: 17348, comm: pm-hibernate Not tainted 2.6.33.2v2 #4 > Apr 13 09:39:34 localhost kernel: [ 8569.461127] Call Trace: > Apr 13 09:39:34 localhost kernel: [ 8569.461127] [] ? printk+0xf/0x16 > Apr 13 09:39:34 localhost kernel: [ 8569.461127] [] print_circular_bug+0x90/0x9c > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] __lock_acquire+0x93a/0xbb7 > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] ? update_curr+0x177/0x17f > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] ? mark_lock+0x1e/0x1ea > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] lock_acquire+0x94/0xb1 > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] ? sync_filesystems+0x14/0xd6 > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] __mutex_lock_common+0x35/0x2f3 > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] ? sync_filesystems+0x14/0xd6 > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] ? bdi_alloc_queue_work+0x84/0xa0 > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] mutex_lock_nested+0x30/0x38 > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] ? sync_filesystems+0x14/0xd6 > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] sync_filesystems+0x14/0xd6 > Apr 13 09:39:34 localhost kernel: [ 8569.462128] [] sys_sync+0x11/0x2d > Apr 13 09:39:34 localhost kernel: [ 8569.463127] [] hibernate+0x7d/0x18d > Apr 13 09:39:34 localhost kernel: [ 8569.463127] [] ? state_store+0x0/0xa8 > Apr 13 09:39:34 localhost kernel: [ 8569.463127] [] state_store+0x56/0xa8 > Apr 13 09:39:34 localhost kernel: [ 8569.463127] [] ? state_store+0x0/0xa8 > Apr 13 09:39:34 localhost kernel: [ 8569.463127] [] kobj_attr_store+0x1a/0x22 > Apr 13 09:39:34 localhost kernel: [ 8569.463127] [] sysfs_write_file+0xb9/0xe4 > Apr 13 09:39:34 localhost kernel: [ 8569.463127] [] ? sysfs_write_file+0x0/0xe4 > Apr 13 09:39:34 localhost kernel: [ 8569.463127] [] vfs_write+0x84/0xdf > Apr 13 09:39:34 localhost kernel: [ 8569.463127] [] sys_write+0x3b/0x60 > Apr 13 09:39:34 localhost kernel: [ 8569.463127] [] syscall_call+0x7/0xb > Apr 13 09:39:34 localhost kernel: [ 8569.484133] done. > > Apr 13 09:39:34 localhost kernel: [ 8569.484223] Freezing user space processes ... (elapsed 0.04 seconds) done. > Apr 13 09:39:34 localhost kernel: [ 8569.528142] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done. > Apr 13 09:39:34 localhost kernel: [ 8569.539272] PM: Preallocating image memory... done (allocated 349210 pages) > Apr 13 09:39:34 localhost kernel: [ 8583.627118] PM: Allocated 1396840 kbytes in 14.08 seconds (99.20 MB/s) > > Regards, > Richard > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/