aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-09 18:59:21 -0500
committerIngo Molnar <mingo@hera.kernel.org>2006-01-09 18:59:21 -0500
commitde5097c2e73f826302cd8957c225b3725e0c7553 (patch)
tree3d56ab6fd891088ac55a9ef529faf4360391a22f /kernel
parent408894ee4dd4debfdedd472eb4d8414892fc90f6 (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 'kernel')
-rw-r--r--kernel/exit.c5
-rw-r--r--kernel/sched.c1
2 files changed, 6 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 @@
29#include <linux/syscalls.h> 29#include <linux/syscalls.h>
30#include <linux/signal.h> 30#include <linux/signal.h>
31#include <linux/cn_proc.h> 31#include <linux/cn_proc.h>
32#include <linux/mutex.h>
32 33
33#include <asm/uaccess.h> 34#include <asm/uaccess.h>
34#include <asm/unistd.h> 35#include <asm/unistd.h>
@@ -869,6 +870,10 @@ fastcall NORET_TYPE void do_exit(long code)
869 mpol_free(tsk->mempolicy); 870 mpol_free(tsk->mempolicy);
870 tsk->mempolicy = NULL; 871 tsk->mempolicy = NULL;
871#endif 872#endif
873 /*
874 * If DEBUG_MUTEXES is on, make sure we are holding no locks:
875 */
876 mutex_debug_check_no_locks_held(tsk);
872 877
873 /* PF_DEAD causes final put_task_struct after we schedule. */ 878 /* PF_DEAD causes final put_task_struct after we schedule. */
874 preempt_disable(); 879 preempt_disable();
diff --git a/kernel/sched.c b/kernel/sched.c
index 92733091154c..34a945bcc022 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4386,6 +4386,7 @@ void show_state(void)
4386 } while_each_thread(g, p); 4386 } while_each_thread(g, p);
4387 4387
4388 read_unlock(&tasklist_lock); 4388 read_unlock(&tasklist_lock);
4389 mutex_debug_show_all_locks();
4389} 4390}
4390 4391
4391/** 4392/**