diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-10 02:59:21 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@hera.kernel.org> | 2006-01-10 02:59:21 +0300 |
commit | de5097c2e73f826302cd8957c225b3725e0c7553 (patch) | |
tree | 3d56ab6fd891088ac55a9ef529faf4360391a22f /drivers | |
parent | 408894ee4dd4debfdedd472eb4d8414892fc90f6 (diff) | |
download | linux-de5097c2e73f826302cd8957c225b3725e0c7553.tar.xz |
[PATCH] mutex subsystem, more debugging code
more mutex debugging: check for held locks during memory freeing,
task exit, enable sysrq printouts, etc.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/sysrq.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 145275ebdd7e..5765f672e853 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c @@ -153,6 +153,21 @@ static struct sysrq_key_op sysrq_mountro_op = { /* END SYNC SYSRQ HANDLERS BLOCK */ +#ifdef CONFIG_DEBUG_MUTEXES + +static void +sysrq_handle_showlocks(int key, struct pt_regs *pt_regs, struct tty_struct *tty) +{ + mutex_debug_show_all_locks(); +} + +static struct sysrq_key_op sysrq_showlocks_op = { + .handler = sysrq_handle_showlocks, + .help_msg = "show-all-locks(D)", + .action_msg = "Show Locks Held", +}; + +#endif /* SHOW SYSRQ HANDLERS BLOCK */ @@ -294,7 +309,11 @@ static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = { #else /* c */ NULL, #endif +#ifdef CONFIG_DEBUG_MUTEXES +/* d */ &sysrq_showlocks_op, +#else /* d */ NULL, +#endif /* e */ &sysrq_term_op, /* f */ &sysrq_moom_op, /* g */ NULL, |