Commit 8ad9ce07 authored by Linus Torvalds's avatar Linus Torvalds

Do proper signal locking for the old-style /proc/stat too.

parent 4883c96a
......@@ -316,7 +316,15 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
wchan = get_wchan(task);
collect_sigign_sigcatch(task, &sigign, &sigcatch);
sigemptyset(&sigign);
sigemptyset(&sigcatch);
read_lock(&tasklist_lock);
if (task->sighand) {
spin_lock_irq(&task->sighand->siglock);
collect_sigign_sigcatch(task, &sigign, &sigcatch);
spin_lock_irq(&task->sighand->siglock);
}
read_unlock(&tasklist_lock);
/* scale priority and nice values from timeslices to -20..20 */
/* to make it look like a "normal" Unix priority/nice value */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment