diff options
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index b6b36768b758..1c8814481a11 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1367,7 +1367,6 @@ int do_notify_parent(struct task_struct *tsk, int sig) | |||
1367 | struct siginfo info; | 1367 | struct siginfo info; |
1368 | unsigned long flags; | 1368 | unsigned long flags; |
1369 | struct sighand_struct *psig; | 1369 | struct sighand_struct *psig; |
1370 | struct task_cputime cputime; | ||
1371 | int ret = sig; | 1370 | int ret = sig; |
1372 | 1371 | ||
1373 | BUG_ON(sig == -1); | 1372 | BUG_ON(sig == -1); |
@@ -1397,9 +1396,10 @@ int do_notify_parent(struct task_struct *tsk, int sig) | |||
1397 | info.si_uid = __task_cred(tsk)->uid; | 1396 | info.si_uid = __task_cred(tsk)->uid; |
1398 | rcu_read_unlock(); | 1397 | rcu_read_unlock(); |
1399 | 1398 | ||
1400 | thread_group_cputime(tsk, &cputime); | 1399 | info.si_utime = cputime_to_clock_t(cputime_add(tsk->utime, |
1401 | info.si_utime = cputime_to_jiffies(cputime.utime); | 1400 | tsk->signal->utime)); |
1402 | info.si_stime = cputime_to_jiffies(cputime.stime); | 1401 | info.si_stime = cputime_to_clock_t(cputime_add(tsk->stime, |
1402 | tsk->signal->stime)); | ||
1403 | 1403 | ||
1404 | info.si_status = tsk->exit_code & 0x7f; | 1404 | info.si_status = tsk->exit_code & 0x7f; |
1405 | if (tsk->exit_code & 0x80) | 1405 | if (tsk->exit_code & 0x80) |
@@ -1575,7 +1575,15 @@ static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info) | |||
1575 | read_lock(&tasklist_lock); | 1575 | read_lock(&tasklist_lock); |
1576 | if (may_ptrace_stop()) { | 1576 | if (may_ptrace_stop()) { |
1577 | do_notify_parent_cldstop(current, CLD_TRAPPED); | 1577 | do_notify_parent_cldstop(current, CLD_TRAPPED); |
1578 | /* | ||
1579 | * Don't want to allow preemption here, because | ||
1580 | * sys_ptrace() needs this task to be inactive. | ||
1581 | * | ||
1582 | * XXX: implement read_unlock_no_resched(). | ||
1583 | */ | ||
1584 | preempt_disable(); | ||
1578 | read_unlock(&tasklist_lock); | 1585 | read_unlock(&tasklist_lock); |
1586 | preempt_enable_no_resched(); | ||
1579 | schedule(); | 1587 | schedule(); |
1580 | } else { | 1588 | } else { |
1581 | /* | 1589 | /* |