diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/fork.c | 11 | ||||
-rw-r--r-- | kernel/tsacct.c | 6 |
2 files changed, 10 insertions, 7 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 8de303bdd4e5..6715ebc3761d 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1184,10 +1184,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1184 | #endif | 1184 | #endif |
1185 | clear_all_latency_tracing(p); | 1185 | clear_all_latency_tracing(p); |
1186 | 1186 | ||
1187 | /* Our parent execution domain becomes current domain | ||
1188 | These must match for thread signalling to apply */ | ||
1189 | p->parent_exec_id = p->self_exec_id; | ||
1190 | |||
1191 | /* ok, now we should be set up.. */ | 1187 | /* ok, now we should be set up.. */ |
1192 | p->exit_signal = (clone_flags & CLONE_THREAD) ? -1 : (clone_flags & CSIGNAL); | 1188 | p->exit_signal = (clone_flags & CLONE_THREAD) ? -1 : (clone_flags & CSIGNAL); |
1193 | p->pdeath_signal = 0; | 1189 | p->pdeath_signal = 0; |
@@ -1225,10 +1221,13 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1225 | set_task_cpu(p, smp_processor_id()); | 1221 | set_task_cpu(p, smp_processor_id()); |
1226 | 1222 | ||
1227 | /* CLONE_PARENT re-uses the old parent */ | 1223 | /* CLONE_PARENT re-uses the old parent */ |
1228 | if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) | 1224 | if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) { |
1229 | p->real_parent = current->real_parent; | 1225 | p->real_parent = current->real_parent; |
1230 | else | 1226 | p->parent_exec_id = current->parent_exec_id; |
1227 | } else { | ||
1231 | p->real_parent = current; | 1228 | p->real_parent = current; |
1229 | p->parent_exec_id = current->self_exec_id; | ||
1230 | } | ||
1232 | 1231 | ||
1233 | spin_lock(¤t->sighand->siglock); | 1232 | spin_lock(¤t->sighand->siglock); |
1234 | 1233 | ||
diff --git a/kernel/tsacct.c b/kernel/tsacct.c index 43f891b05a4b..00d59d048edf 100644 --- a/kernel/tsacct.c +++ b/kernel/tsacct.c | |||
@@ -122,8 +122,10 @@ void acct_update_integrals(struct task_struct *tsk) | |||
122 | if (likely(tsk->mm)) { | 122 | if (likely(tsk->mm)) { |
123 | cputime_t time, dtime; | 123 | cputime_t time, dtime; |
124 | struct timeval value; | 124 | struct timeval value; |
125 | unsigned long flags; | ||
125 | u64 delta; | 126 | u64 delta; |
126 | 127 | ||
128 | local_irq_save(flags); | ||
127 | time = tsk->stime + tsk->utime; | 129 | time = tsk->stime + tsk->utime; |
128 | dtime = cputime_sub(time, tsk->acct_timexpd); | 130 | dtime = cputime_sub(time, tsk->acct_timexpd); |
129 | jiffies_to_timeval(cputime_to_jiffies(dtime), &value); | 131 | jiffies_to_timeval(cputime_to_jiffies(dtime), &value); |
@@ -131,10 +133,12 @@ void acct_update_integrals(struct task_struct *tsk) | |||
131 | delta = delta * USEC_PER_SEC + value.tv_usec; | 133 | delta = delta * USEC_PER_SEC + value.tv_usec; |
132 | 134 | ||
133 | if (delta == 0) | 135 | if (delta == 0) |
134 | return; | 136 | goto out; |
135 | tsk->acct_timexpd = time; | 137 | tsk->acct_timexpd = time; |
136 | tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm); | 138 | tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm); |
137 | tsk->acct_vm_mem1 += delta * tsk->mm->total_vm; | 139 | tsk->acct_vm_mem1 += delta * tsk->mm->total_vm; |
140 | out: | ||
141 | local_irq_restore(flags); | ||
138 | } | 142 | } |
139 | } | 143 | } |
140 | 144 | ||