linux/arch/s390
Michael Holzheu 5a334c082f s390/debug: Fix s390dbf lockdep problem in debug_(un)register_view()
The debug_register/unregister_view() functions call debugfs_remove()
while holding the debug_info spinlock. Because debugfs_remove() takes
a mutex and therefore can sleep this is not allowed. To fix the problem
we give up the debug_info lock before calling debugfs_remove().

The following shows the lockdep message:

[ INFO: possible circular locking dependency detected ]
-------------------------------------------------------
rmmod/4379 is trying to acquire lock:
(&sb->s_type->i_mutex_key#2){+.+.+.}, at: [<00000000003acae2>] debugfs_remove+0x5e/0xa

but task is already holding lock:
(&(&rc->lock)->rlock){-.-...}, at: [<000000000010a5ae>] debug_unregister_view+0x3a/0xd

which lock already depends on the new lock.

-> #0 (&sb->s_type->i_mutex_key#2){+.+.+.}:
[<00000000001b1644>] validate_chain+0x880/0x1154
[<00000000001b4d6c>] __lock_acquire+0x414/0xc44
[<00000000001b5c16>] lock_acquire+0xbe/0x178
[<0000000000614016>] mutex_lock_nested+0x66/0x36c
[<00000000003acae2>] debugfs_remove+0x5e/0xac
[<000000000010a620>] debug_unregister_view+0xac/0xd0
[<000003ff8002f140>] qeth_core_exit+0x48/0xf08 [qeth]
[<00000000001c35a4>] SyS_delete_module+0x1a4/0x260
[<0000000000618134>] sysc_noemu+0x22/0x28
[<000003fffd4704da>] 0x3fffd4704da

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-01-08 10:57:03 +01:00
..
appldata s390/vtimer: rework virtual timer interface 2012-07-20 11:15:08 +02:00
boot s390: fix linker script for 31 bit builds 2012-10-18 17:50:10 +02:00
crypto s390/crypto: Don't panic after crypto instruction failures 2012-11-23 11:14:27 +01:00
hypfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-10-02 20:25:04 -07:00
include Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
kernel s390/debug: Fix s390dbf lockdep problem in debug_(un)register_view() 2013-01-08 10:57:03 +01:00
kvm Merge tag 'kvm-3.8-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-12-13 15:31:08 -08:00
lib s390/mm: use pmd_large() instead of pmd_huge() 2012-10-26 16:44:23 +02:00
math-emu s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
mm s390/ptrace: race of single stepping vs signal delivery 2012-11-23 11:14:33 +01:00
net s390/bpf,jit: add support for XOR instruction 2012-12-03 10:44:05 -05:00
oprofile oprofile, s390: Fix uninitialized memory access when writing to oprofilefs 2012-08-27 14:49:23 +02:00
pci ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
defconfig s390: update defconfig 2012-09-26 15:45:29 +02:00
Kbuild s390/pci: base support 2012-11-30 15:40:45 +01:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
Kconfig.debug s390/mm: add page table dumper 2012-10-09 14:16:58 +02:00
Makefile s390: add zEC12 code generation support 2012-11-23 11:14:31 +01:00