diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 1cd46a4fb0d3..b7db7fb74f53 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 | ||