Ingo Molnar 58d5d0d8dd x86: fix deadlock, make pgd_lock irq-safe
lockdep just caught this one:

=================================
[ INFO: inconsistent lock state ]
2.6.24 #38
---------------------------------
inconsistent {in-softirq-W} -> {softirq-on-W} usage.
swapper/1 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (pgd_lock){-+..}, at: [<ffffffff8022a9ea>] mm_init+0x1da/0x250
{in-softirq-W} state was registered at:
  [<ffffffffffffffff>] 0xffffffffffffffff
irq event stamp: 394559
hardirqs last  enabled at (394559): [<ffffffff80267f0a>] get_page_from_freelist+0x30a/0x4c0
hardirqs last disabled at (394558): [<ffffffff80267d25>] get_page_from_freelist+0x125/0x4c0
softirqs last  enabled at (393952): [<ffffffff80232f8e>] __do_softirq+0xce/0xe0
softirqs last disabled at (393945): [<ffffffff8020c57c>] call_softirq+0x1c/0x30

other info that might help us debug this:
no locks held by swapper/1.

stack backtrace:
Pid: 1, comm: swapper Not tainted 2.6.24 #38

Call Trace:
 [<ffffffff8024e1fb>] print_usage_bug+0x18b/0x190
 [<ffffffff8024f55d>] mark_lock+0x53d/0x560
 [<ffffffff8024fffa>] __lock_acquire+0x3ca/0xed0
 [<ffffffff80250ba8>] lock_acquire+0xa8/0xe0
 [<ffffffff8022a9ea>] ? mm_init+0x1da/0x250
 [<ffffffff809bcd10>] _spin_lock+0x30/0x70
 [<ffffffff8022a9ea>] mm_init+0x1da/0x250
 [<ffffffff8022aa99>] mm_alloc+0x39/0x50
 [<ffffffff8028b95a>] bprm_mm_init+0x2a/0x1a0
 [<ffffffff8028d12b>] do_execve+0x7b/0x220
 [<ffffffff80209776>] sys_execve+0x46/0x70
 [<ffffffff8020c214>] kernel_execve+0x64/0xd0
 [<ffffffff8020901e>] ? _stext+0x1e/0x20
 [<ffffffff802090ba>] init_post+0x9a/0xf0
 [<ffffffff809bc5f6>] ? trace_hardirqs_on_thunk+0x35/0x3a
 [<ffffffff8024f75a>] ? trace_hardirqs_on+0xba/0xd0
 [<ffffffff8020c1a8>] ? child_rip+0xa/0x12
 [<ffffffff8020bcbc>] ? restore_args+0x0/0x44
 [<ffffffff8020c19e>] ? child_rip+0x0/0x12

turns out that pgd_lock has been used on 64-bit x86 in an irq-unsafe
way for almost two years, since commit 8c914cb704a11460e.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-06 22:39:45 +01:00
..
2008-01-30 13:30:35 +01:00
2008-01-30 13:30:35 +01:00
2008-01-30 13:30:35 +01:00
2008-01-30 13:30:35 +01:00
2007-10-23 22:37:23 +02:00
2008-01-30 13:34:07 +01:00
2008-01-30 13:31:24 +01:00
2007-10-17 20:17:13 +02:00
2008-01-30 13:31:19 +01:00
2008-01-30 13:30:28 +01:00
2008-02-04 16:48:04 +01:00
2007-10-17 20:17:15 +02:00
2008-01-30 13:34:09 +01:00
2008-02-03 16:32:51 +02:00
2007-10-17 20:17:08 +02:00
2007-10-17 20:17:17 +02:00
2008-01-30 13:31:14 +01:00
2008-01-30 13:31:51 +01:00
2007-10-23 22:37:23 +02:00
2007-10-22 21:20:01 +02:00
2007-10-16 11:26:02 +02:00
2008-01-30 13:30:20 +01:00
2008-01-30 13:33:32 +01:00
2007-10-17 20:17:19 +02:00
2008-02-04 16:48:06 +01:00
2008-01-30 13:33:16 +01:00
2007-10-17 20:17:08 +02:00
2007-10-17 20:17:21 +02:00
2007-10-17 20:24:56 +02:00
2008-01-30 13:33:09 +01:00
2008-01-30 13:33:35 +01:00
2008-02-04 16:48:03 +01:00
2008-01-30 13:33:14 +01:00
2008-01-30 13:33:14 +01:00
2008-01-30 13:30:46 +01:00
2008-01-30 13:30:28 +01:00
2008-01-30 13:34:09 +01:00
2007-10-17 20:26:11 +02:00
2007-10-30 00:22:22 +01:00
2008-01-30 13:30:33 +01:00
2008-01-30 13:30:16 +01:00
2008-01-30 17:53:08 +02:00
2008-01-30 13:31:26 +01:00
2008-01-30 13:31:27 +01:00
2007-10-17 20:16:47 +02:00
2008-01-30 22:50:04 +11:00
2008-01-30 13:33:00 +01:00
2008-01-30 13:31:26 +01:00
2008-01-30 13:31:55 +01:00
2007-10-17 20:26:15 +02:00
2008-01-30 13:31:43 +01:00
2008-01-30 13:30:35 +01:00
2008-01-30 13:30:36 +01:00
2007-10-23 22:37:24 +02:00
2008-01-30 13:33:18 +01:00
2008-01-30 13:30:31 +01:00
2008-01-30 13:34:10 +01:00
2008-01-30 13:34:06 +01:00
2008-02-04 16:48:09 +01:00
2008-01-30 13:30:31 +01:00
2008-01-30 13:30:38 +01:00
2008-01-30 13:31:25 +01:00
2008-01-30 13:32:53 +01:00
2008-01-30 13:33:42 +01:00
2008-02-04 16:48:06 +01:00
2007-10-17 20:17:08 +02:00
2007-10-17 20:17:08 +02:00
2008-01-30 13:33:00 +01:00
2007-10-17 20:17:08 +02:00
2008-01-30 13:33:00 +01:00
2007-10-17 08:42:47 -07:00
2007-10-23 22:37:24 +02:00
2008-01-30 13:30:50 +01:00
2008-01-30 13:31:21 +01:00
2008-01-30 13:33:00 +01:00
2007-10-23 22:37:24 +02:00
2007-10-23 22:37:24 +02:00
2008-01-30 13:31:12 +01:00
2008-02-04 16:48:03 +01:00
2007-10-17 20:26:18 +02:00
2008-01-30 13:30:35 +01:00
2008-01-30 13:33:24 +01:00
2007-10-17 20:32:07 +02:00
2007-10-17 20:32:38 +02:00
2008-01-30 13:30:42 +01:00
2008-02-04 16:48:04 +01:00
2008-01-30 13:32:39 +01:00