2010-04-09 19:54:19

by Roland McGrath

[permalink] [raw]
Subject: Re: [PATCH -mm 2/3] proc: make collect_sigign_sigcatch() rcu-safe

> In theory, this ->sighand can be re-used under us (but it can't go away).
> We could check task->sighand == sighand once again after the main loop
> to prevent the race with exit/exec, but I don't think this is really
> needed for fs/proc.

In v2.6.34-rc3-500-g0eddb51 this isn't possible because the calls from
task_sig() and do_task_stat() are under siglock. Is that locking removed
by another pending change?


Thanks,
Roland


2010-04-12 20:28:37

by Oleg Nesterov

[permalink] [raw]
Subject: Re: [PATCH -mm 2/3] proc: make collect_sigign_sigcatch() rcu-safe

On 04/09, Roland McGrath wrote:
>
> > In theory, this ->sighand can be re-used under us (but it can't go away).
> > We could check task->sighand == sighand once again after the main loop
> > to prevent the race with exit/exec, but I don't think this is really
> > needed for fs/proc.
>
> In v2.6.34-rc3-500-g0eddb51 this isn't possible because the calls from
> task_sig() and do_task_stat() are under siglock.

Yes sure. If it is called under ->siglock we have no races we should
worry about.

> Is that locking removed
> by another pending change?

Yes, the next 3/3 patch.

Oleg.