Re: [PATCH 18/41] OpenRISC: Don't reimplement force_sigsegv()

From: Oleg Nesterov
Date: Thu Aug 18 2011 - 13:50:58 EST


On 08/16, Matt Fleming wrote:
>
> On Tue, 2011-08-16 at 18:49 +0200, Oleg Nesterov wrote:
> >
> > And since force_sigsegv() drops
> > the lock after setting SIG_DFL we can "race" with the sub-thread anyway.
>
> I did notice that race in force_sigsegv() too, is it a real problem?

Oh, I don't really know. I mean, I do not know if this really needs
the fix.

OK, suppose that another thread does signal(SIGSEGV, SIG_IGN) in
between. This probably means it asks for the problems anyway. and
we can pretend this was done before this SIGSEGV was dequeued.

If it does signal(SIGSEGV, my_handler), then most probably
force_sigsegv() will be called again soon, after dequeueing SIGSEGV.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/