[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1181776729.14818.350.camel@localhost.localdomain>
Date: Thu, 14 Jun 2007 09:18:49 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Roland McGrath <roland@...hat.com>
Cc: Oleg Nesterov <oleg@...sign.ru>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Satoru Takeuchi <takeuchi_satoru@...fujitsu.com>
Subject: Re: [BUG] ptraced process waiting on syscall may return kernel
internal errnos
On Wed, 2007-06-13 at 16:01 -0700, Roland McGrath wrote:
>
> > What about something like:
> >
> > do {
> > rm_from_queue_full(&mask, &t->pending);
> > - recalc_sigpending_and_wake(t);
> > t = next_thread(t);
> > } while (t != current);
> > + recalc_sigpending();
>
> There is no need for the +, just the -. The calling thread is the one
> where know there is certainly no perturbation of behavior due to leaving
> TIF_SIGPENDING set rather than clearing it. It's just going to exit the
> syscall and deal with signal state properly on the way out either way.
> Doing recalc_sigpending is an unnecessary optimization of the corner case.
Fair enough. I'll cook a patch for that one when I'm at work.
> > So at the end of the day, easier to test it inside dequeue_signal().
>
> Before completely revamping the whole set of entrypoints to be saner all
> around, yes.
btw, another interesting grep is to see how tweak TIF_SIGPENDING by
hand ... there's some scary bits in the tty code too...
Ben.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists