aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-07-03 03:24:42 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-03 18:27:03 -0400
commitde30a2b355ea85350ca2f58f3b9bf4e5bc007986 (patch)
tree0bef670aff65614b3c78ca13b20307355b8221d5 /kernel/fork.c
parent5bdc9b447c0076f494a56fdcd93ee8c5e78a2afd (diff)
[PATCH] lockdep: irqtrace subsystem, core
Accurate hard-IRQ-flags and softirq-flags state tracing. This allows us to attach extra functionality to IRQ flags on/off events (such as trace-on/off). Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 1cd46a4fb0d..b7db7fb74f5 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -968,6 +968,10 @@ static task_t *copy_process(unsigned long clone_flags,
968 if (!p) 968 if (!p)
969 goto fork_out; 969 goto fork_out;
970 970
971#ifdef CONFIG_TRACE_IRQFLAGS
972 DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
973 DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
974#endif
971 retval = -EAGAIN; 975 retval = -EAGAIN;
972 if (atomic_read(&p->user->processes) >= 976 if (atomic_read(&p->user->processes) >=
973 p->signal->rlim[RLIMIT_NPROC].rlim_cur) { 977 p->signal->rlim[RLIMIT_NPROC].rlim_cur) {
@@ -1042,6 +1046,21 @@ static task_t *copy_process(unsigned long clone_flags,
1042 } 1046 }
1043 mpol_fix_fork_child_flag(p); 1047 mpol_fix_fork_child_flag(p);
1044#endif 1048#endif
1049#ifdef CONFIG_TRACE_IRQFLAGS
1050 p->irq_events = 0;
1051 p->hardirqs_enabled = 0;
1052 p->hardirq_enable_ip = 0;
1053 p->hardirq_enable_event = 0;
1054 p->hardirq_disable_ip = _THIS_IP_;
1055 p->hardirq_disable_event = 0;
1056 p->softirqs_enabled = 1;
1057 p->softirq_enable_ip = _THIS_IP_;
1058 p->softirq_enable_event = 0;
1059 p->softirq_disable_ip = 0;
1060 p->softirq_disable_event = 0;
1061 p->hardirq_context = 0;
1062 p->softirq_context = 0;
1063#endif
1045 1064
1046 rt_mutex_init_task(p); 1065 rt_mutex_init_task(p);
1047 1066