Re: [BUG] signal: sighand unprotected when accessed by /proc

Steven Rostedt
2014-06-03T20:15:21Z

On Tue, 3 Jun 2014 22:09:38 +0200
Oleg Nesterov <oleg@redhat.com> wrote:

> > Now, if that lock is released and reused (I didn't trace other tasks
> > allocating these locks), it reinitializes the lock->wait_list.
>
> How? From where? This should be done by sighand_ctor() only?

heh, the more I look at this code, the deeper in the rabbit hole I go.

OK, I didn't understand this in the first place. I see that
sighand_ctor() is only called when the entire slab is created, correct?

That means, when you allocate a new sighand, it doesn't get
re-initialized, and the sighand->lock should still be the old lock.

That makes sense. I'll need to look at this some more :-/ Maybe
there's another bug that I'm missing and I'm climbing the wrong tree.

-- Steve