Re: [PATCH] tty: fix leakage of -ERESTARTSYS to userland

2007-05-31 Thread Roland McGrath
That looks good to me. Thanks, Roland - 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/

Re: [PATCH] tty: fix leakage of -ERESTARTSYS to userland

2007-05-30 Thread Satoru Takeuchi
At Wed, 30 May 2007 18:08:55 -0700 (PDT), Roland McGrath wrote: > > Aside from typos, I think it should be more clearly and strongly worded. > > "These should never be seen by user programs. To return one of these > codes, signal_pending() MUST be set. Note that ptrace can observe these at > sy

Re: [PATCH] tty: fix leakage of -ERESTARTSYS to userland

2007-05-30 Thread Roland McGrath
Aside from typos, I think it should be more clearly and strongly worded. "These should never be seen by user programs. To return one of these codes, signal_pending() MUST be set. Note that ptrace can observe these at syscall exit tracing, but they will never be left for the debugged user process

Re: [PATCH] tty: fix leakage of -ERESTARTSYS to userland

2007-05-30 Thread Satoru Takeuchi
At Wed, 30 May 2007 23:18:49 +0400, Oleg Nesterov wrote: > > On 05/30, Andrew Morton wrote: > > On Tue, 29 May 2007 22:44:35 +0400 > > Oleg Nesterov <[EMAIL PROTECTED]> wrote: > > > > > --- t/drivers/char/n_tty.c~ 2007-04-05 12:18:26.0 +0400 > > > +++ t/drivers/char/n_tty.c2

Re: [PATCH] tty: fix leakage of -ERESTARTSYS to userland

2007-05-30 Thread Oleg Nesterov
On 05/30, Andrew Morton wrote: > On Tue, 29 May 2007 22:44:35 +0400 > Oleg Nesterov <[EMAIL PROTECTED]> wrote: > > > --- t/drivers/char/n_tty.c~ 2007-04-05 12:18:26.0 +0400 > > +++ t/drivers/char/n_tty.c 2007-05-28 10:57:58.0 +0400 > > @@ -1191,6 +1191,7 @@ static int job_control(

Re: [PATCH] tty: fix leakage of -ERESTARTSYS to userland

2007-05-30 Thread Andrew Morton
On Tue, 29 May 2007 22:44:35 +0400 Oleg Nesterov <[EMAIL PROTECTED]> wrote: > Spotted by Satoru Takeuchi. > > kill_pgrp(task_pgrp(current)) sends the signal to the current's thread group, > but can choose any sub-thread as a target for signal_wake_up(). This means > that job_control() and tty_che

[PATCH] tty: fix leakage of -ERESTARTSYS to userland

2007-05-29 Thread Oleg Nesterov
Spotted by Satoru Takeuchi. kill_pgrp(task_pgrp(current)) sends the signal to the current's thread group, but can choose any sub-thread as a target for signal_wake_up(). This means that job_control() and tty_check_change() may return -ERESTARTSYS without signal_pending(). Signed-off-by: Oleg Nest