projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
exit: wait: drop tasklist_lock before psig->c* accounting
[cascardo/linux.git]
/
kernel
/
exit.c
diff --git
a/kernel/exit.c
b/kernel/exit.c
index
457673d
..
6297eb0
100644
(file)
--- a/
kernel/exit.c
+++ b/
kernel/exit.c
@@
-1005,6
+1005,11
@@
static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
EXIT_TRACE : EXIT_DEAD;
if (cmpxchg(&p->exit_state, EXIT_ZOMBIE, state) != EXIT_ZOMBIE)
return 0;
EXIT_TRACE : EXIT_DEAD;
if (cmpxchg(&p->exit_state, EXIT_ZOMBIE, state) != EXIT_ZOMBIE)
return 0;
+ /*
+ * We own this thread, nobody else can reap it.
+ */
+ read_unlock(&tasklist_lock);
+ sched_annotate_sleep();
/*
* Check thread_group_leader() to exclude the traced sub-threads.
/*
* Check thread_group_leader() to exclude the traced sub-threads.
@@
-1064,13
+1069,6
@@
static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
spin_unlock_irq(¤t->sighand->siglock);
}
spin_unlock_irq(¤t->sighand->siglock);
}
- /*
- * Now we are sure this task is interesting, and no other
- * thread can reap it because we its state == DEAD/TRACE.
- */
- read_unlock(&tasklist_lock);
- sched_annotate_sleep();
-
retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
status = (p->signal->flags & SIGNAL_GROUP_EXIT)
retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
status = (p->signal->flags & SIGNAL_GROUP_EXIT)