diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-09 15:59:21 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@hera.kernel.org> | 2006-01-09 15:59:21 -0800 |
commit | de5097c2e73f826302cd8957c225b3725e0c7553 (patch) | |
tree | 3d56ab6fd891088ac55a9ef529faf4360391a22f /kernel/exit.c | |
parent | 408894ee4dd4debfdedd472eb4d8414892fc90f6 (diff) | |
download | lwn-de5097c2e73f826302cd8957c225b3725e0c7553.tar.gz lwn-de5097c2e73f826302cd8957c225b3725e0c7553.zip |
[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 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index caceabf3f230..309a46fa16f8 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -29,6 +29,7 @@ #include <linux/syscalls.h> #include <linux/signal.h> #include <linux/cn_proc.h> +#include <linux/mutex.h> #include <asm/uaccess.h> #include <asm/unistd.h> @@ -869,6 +870,10 @@ fastcall NORET_TYPE void do_exit(long code) mpol_free(tsk->mempolicy); tsk->mempolicy = NULL; #endif + /* + * If DEBUG_MUTEXES is on, make sure we are holding no locks: + */ + mutex_debug_check_no_locks_held(tsk); /* PF_DEAD causes final put_task_struct after we schedule. */ preempt_disable(); |