Re: [BUG] ptraced process waiting on syscall may return kernel internal errnos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux