Messages in this thread Patch in this message | | | Date | Sun, 16 Feb 2003 19:54:07 -0800 | From | "Martin J. Bligh" <> | Subject | [PATCH] fix secondary oops in sighand locking |
| |
>> Ran your patch ... but I get plenty of these now: >> >> Unable to handle kernel NULL pointer dereference at virtual address 00000004 >> ... > > Ah, I see what happened, I think .... the locking used to be inside > collect_sigign_sigcatch, and you moved it out into task_sig ... but > there were two callers of collect_sigign_sigcatch, the other one being > proc_pid_stat ... which now needs to have appropriate locking added to > it as well to match the change ... I'll see if I can get something > together that works for that.
OK, with this small extra patch, we now survive a beating with SDET without oops or freeze. The patch adds the locking that was removed from collect_sigign_sigcatch to the second caller (proc_pid_stat), as well as task_sig.
diff -urpN -X /home/fletch/.diff.exclude linus-sdet/fs/proc/array.c linus-sdet-fix/fs/proc/array.c --- linus-sdet/fs/proc/array.c Sun Feb 16 18:48:04 2003 +++ linus-sdet-fix/fs/proc/array.c Sun Feb 16 18:51:34 2003 @@ -316,7 +316,12 @@ int proc_pid_stat(struct task_struct *ta wchan = get_wchan(task); - collect_sigign_sigcatch(task, &sigign, &sigcatch); + sigemptyset(&sigign); + sigemptyset(&sigcatch); + read_lock(&tasklist_lock); + if (task->sighand) + collect_sigign_sigcatch(task, &sigign, &sigcatch); + 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 */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |