From 513627d7fec6fcb7b3d56ce355cb4d192c76b530 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Sun, 27 Aug 2006 01:23:57 -0700 Subject: [PATCH] fix up lockdep trace in fs/exec.c This fixes the locking error noticed by lockdep: ============================================= [ INFO: possible recursive locking detected ] --------------------------------------------- init/1 is trying to acquire lock: (&sighand->siglock){....}, at: [] flush_old_exec+0x3ae/0x859 but task is already holding lock: (&sighand->siglock){....}, at: [] flush_old_exec+0x39e/0x859 other info that might help us debug this: 2 locks held by init/1: #0: (tasklist_lock){..--}, at: [] flush_old_exec+0x38e/0x859 #1: (&sighand->siglock){....}, at: [] flush_old_exec+0x39e/0x859 stack backtrace: [] show_trace_log_lvl+0x54/0xfd [] show_trace+0xd/0x10 [] dump_stack+0x19/0x1b [] __lock_acquire+0x773/0x997 [] lock_acquire+0x4b/0x6c [] _spin_lock+0x19/0x28 [] flush_old_exec+0x3ae/0x859 [] load_elf_binary+0x4aa/0x1628 [] search_binary_handler+0xa7/0x24e [] do_execve+0x15b/0x1f9 [] sys_execve+0x29/0x4d [] syscall_call+0x7/0xb Signed-off-by: Arjan van de Ven Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/exec.c b/fs/exec.c index f7aabfeca033..54135df2a966 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -751,7 +751,7 @@ no_thread_group: write_lock_irq(&tasklist_lock); spin_lock(&oldsighand->siglock); - spin_lock(&newsighand->siglock); + spin_lock_nested(&newsighand->siglock, SINGLE_DEPTH_NESTING); rcu_assign_pointer(current->sighand, newsighand); recalc_sigpending(); -- cgit v1.2.3