Re: 2.6.20-rc2-mm1: INFO: possible recursive locking detected in con_close

Laurent Riffard
2006-12-28T21:25:23Z

Le 28.12.2006 11:42, Andrew Morton a écrit :
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc2/2.6.20-rc2-mm1/

Hello,

got this with 2.6.20-rc2-mm1, reverting
gregkh-driver-driver-core-fix-race-in-sysfs-between-sysfs_remove_file-and-read-write.patch
made it disappear.

=============================================
[ INFO: possible recursive locking detected ]
2.6.20-rc2-mm1 #51
---------------------------------------------
init/324 is trying to acquire lock:
(&sysfs_inode_imutex_key){--..}, at: [<c02b2c79>] mutex_lock+0x1c/0x1f

but task is already holding lock:
(&sysfs_inode_imutex_key){--..}, at: [<c02b2c79>] mutex_lock+0x1c/0x1f

other info that might help us debug this:
2 locks held by init/324:
#0: (tty_mutex){--..}, at: [<c02b2c79>] mutex_lock+0x1c/0x1f
#1: (&sysfs_inode_imutex_key){--..}, at: [<c02b2c79>] mutex_lock+0x1c/0x1f

stack backtrace:
[<c0104ea7>] show_trace_log_lvl+0x1a/0x2f
[<c010557a>] show_trace+0x12/0x14
[<c010562c>] dump_stack+0x16/0x18
[<c01314ad>] __lock_acquire+0x116/0xb33
[<c0132283>] lock_acquire+0x56/0x6f
[<c02b2ad3>] __mutex_lock_slowpath+0xdc/0x266
[<c02b2c79>] mutex_lock+0x1c/0x1f
[<c018b293>] sysfs_drop_dentry+0xb7/0x12b
[<c018b3d6>] sysfs_hash_and_remove+0x90/0x14a
[<c018b985>] sysfs_remove_file+0xd/0xf
[<c0235944>] device_remove_file+0x1f/0x2a
[<c02359bb>] device_del+0x31/0x1c4
[<c0235b59>] device_unregister+0xb/0x15
[<c0235bee>] device_destroy+0x8b/0x91
[<c022d7fc>] vcs_remove_sysfs+0x1a/0x36
[<c023254f>] con_close+0x4c/0x60
[<c0226b79>] release_dev+0x221/0x62a
[<c0226f94>] tty_release+0x12/0x1c
[<c015baf1>] __fput+0xb9/0x177
[<c015bc83>] fput+0x31/0x35
[<c015951c>] filp_close+0x54/0x5c
[<c011ac05>] put_files_struct+0x7c/0xb9
[<c011bcef>] do_exit+0x219/0x72f
[<c011c275>] sys_exit_group+0x0/0x11
[<c011c284>] sys_exit_group+0xf/0x11
[<c0103ed2>] sysenter_past_esp+0x5f/0x99
=======================

--
laurent