diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-09 18:59:21 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@hera.kernel.org> | 2006-01-09 18:59:21 -0500 |
commit | de5097c2e73f826302cd8957c225b3725e0c7553 (patch) | |
tree | 3d56ab6fd891088ac55a9ef529faf4360391a22f /drivers/char | |
parent | 408894ee4dd4debfdedd472eb4d8414892fc90f6 (diff) |
[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/char')
-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 = { | |||
153 | 153 | ||
154 | /* END SYNC SYSRQ HANDLERS BLOCK */ | 154 | /* END SYNC SYSRQ HANDLERS BLOCK */ |
155 | 155 | ||
156 | #ifdef CONFIG_DEBUG_MUTEXES | ||
157 | |||
158 | static void | ||
159 | sysrq_handle_showlocks(int key, struct pt_regs *pt_regs, struct tty_struct *tty) | ||
160 | { | ||
161 | mutex_debug_show_all_locks(); | ||
162 | } | ||
163 | |||
164 | static struct sysrq_key_op sysrq_showlocks_op = { | ||
165 | .handler = sysrq_handle_showlocks, | ||
166 | .help_msg = "show-all-locks(D)", | ||
167 | .action_msg = "Show Locks Held", | ||
168 | }; | ||
169 | |||
170 | #endif | ||
156 | 171 | ||
157 | /* SHOW SYSRQ HANDLERS BLOCK */ | 172 | /* SHOW SYSRQ HANDLERS BLOCK */ |
158 | 173 | ||
@@ -294,7 +309,11 @@ static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = { | |||
294 | #else | 309 | #else |
295 | /* c */ NULL, | 310 | /* c */ NULL, |
296 | #endif | 311 | #endif |
312 | #ifdef CONFIG_DEBUG_MUTEXES | ||
313 | /* d */ &sysrq_showlocks_op, | ||
314 | #else | ||
297 | /* d */ NULL, | 315 | /* d */ NULL, |
316 | #endif | ||
298 | /* e */ &sysrq_term_op, | 317 | /* e */ &sysrq_term_op, |
299 | /* f */ &sysrq_moom_op, | 318 | /* f */ &sysrq_moom_op, |
300 | /* g */ NULL, | 319 | /* g */ NULL, |