summaryrefslogtreecommitdiff
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-02-16 03:56:15 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-02-16 03:56:15 -0800
commit8ad9ce0793c2890ae32e489a13d127544c3f6eee (patch)
treea3fca287fb9e61ea874b134fa69184be28714a94 /fs/proc/array.c
parent4883c96a0e3245ca007ad7dd79714daa1c573495 (diff)
Do proper signal locking for the old-style /proc/stat too.
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r--fs/proc/array.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 53edb284329b..e15ffaf61f48 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -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 */