Re: Fw: 2.5.61 oops running SDET

Linus Torvalds
2003-02-16T22:28:47Z

On Sun, 16 Feb 2003, Manfred Spraul wrote:
> Martin J. Bligh wrote:
>
> >diff -urpN -X /home/fletch/.diff.exclude virgin/fs/proc/array.c sdet3/fs/proc/array.c
> >--- virgin/fs/proc/array.c Sat Feb 15 16:11:45 2003
> >+++ sdet3/fs/proc/array.c Sun Feb 16 11:44:24 2003
> >@@ -252,8 +252,11 @@ int proc_pid_status(struct task_struct *
> > buffer = task_mem(mm, buffer);
> > mmput(mm);
> > }
> >- buffer = task_sig(task, buffer);
> >+ task_lock(task);
> >+ if (task->sighand)
> >+ buffer = task_sig(task, buffer);
> > buffer = task_cap(task, buffer);
> >+ task_unlock(task);
> > #if defined(CONFIG_ARCH_S390)
> > buffer = task_show_regs(task, buffer);
> > #endif
> >
> >
> I think it's needed for 2.4, too.

It's not wrong, but it shouldn't help. Simply because "task_lock()"
isn't even relevant to "task->sighand" as it stands now. It will be
cleared without holding the task lock, as far as I can see.

So I suspect it fixes things for Martin only because it changes timings
enough not to hit the race.

Linus