lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061115093354.GA30813@elte.hu>
Date:	Wed, 15 Nov 2006 10:33:54 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Andrew Morton <akpm@...l.org>
Cc:	Stephen Hemminger <shemminger@...l.org>,
	linux-kernel@...r.kernel.org
Subject: Re: sleeping functions called in invalid context during resume


* Andrew Morton <akpm@...l.org> wrote:

> >  [<ffffffff80215059>] vfs_write+0xce/0x174
> >  [<ffffffff802159a5>] sys_write+0x45/0x6e
> >  [<ffffffff802593de>] system_call+0x7e/0x83
> > DWARF2 unwinder stuck at system_call+0x7e/0x83
> > 
> > Leftover inexact backtrace:
> 
> Could mean that someone somewhere forgot to release a spinlock.
> 
> Ingo had a patch which would find the culprit (preempt-tracing.patch).
> 
> Does it still live?

if it's really a spinlock/rwlock release that was missed, then i've got 
good news: we already have that debugging infrastructure, it's called 
lockdep :-)

The patch below makes use of that capability of lockdep for all 
stackdumps that are printed to the console. Stephen, please apply this 
patch, enable CONFIG_PROVE_LOCKING and try to trigger another message. 

	Ingo

---------------->
Subject: lockdep: show held locks when showing a stackdump
From: Ingo Molnar <mingo@...e.hu>

show held locks when printing a backtrace.

Signed-off-by: Ingo Molnar <mingo@...e.hu>

---
 arch/i386/kernel/traps.c   |    1 +
 arch/x86_64/kernel/traps.c |    1 +
 2 files changed, 2 insertions(+)

Index: linux/arch/i386/kernel/traps.c
===================================================================
--- linux.orig/arch/i386/kernel/traps.c
+++ linux/arch/i386/kernel/traps.c
@@ -318,6 +318,7 @@ static void show_stack_log_lvl(struct ta
 	}
 	printk("\n%sCall Trace:\n", log_lvl);
 	show_trace_log_lvl(task, regs, esp, log_lvl);
+	debug_show_held_locks(task);
 }
 
 void show_stack(struct task_struct *task, unsigned long *esp)
Index: linux/arch/x86_64/kernel/traps.c
===================================================================
--- linux.orig/arch/x86_64/kernel/traps.c
+++ linux/arch/x86_64/kernel/traps.c
@@ -405,6 +405,7 @@ show_trace(struct task_struct *tsk, stru
 	printk("\nCall Trace:\n");
 	dump_trace(tsk, regs, stack, &print_trace_ops, NULL);
 	printk("\n");
+	debug_show_held_locks(tsk);
 }
 
 static void
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ