[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110519161922.GB17265@redhat.com>
Date: Thu, 19 May 2011 18:19:23 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Tejun Heo <tj@...nel.org>
Cc: jan.kratochvil@...hat.com, vda.linux@...glemail.com,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, indan@....nu, bdonlan@...il.com
Subject: Re: [PATCH 02/10] job control: introduce JOBCTL_TRAP_STOP and use
it for group stop trap
On 05/19, Tejun Heo wrote:
>
> On Wed, May 18, 2011 at 06:48:14PM +0200, Oleg Nesterov wrote:
> > > Although this adds an unlock-relocking between checking of
> > > JOBCTL_STOP_PENDING and actually trapping for STOP, this doesn't
> > > affect correctness.
> >
> > Well, I think it does affect. Although the problem is minor.
> >
> > > ptrace_stop() already had conditional unlock-relocking
> >
> > Yes, but ptrace_stop() can't send the CLD_STOPPED notfication before
> > the tracee is ready for do_wait(WNOHANG). Contrary, get_signal_to_deliver()
> > can if we race with SIGCONT.
>
> That CLD_STOPPED notification is actually for continuation (although
> it's indistinguishible from actual stopped notification) and as such
> the ptracer has to query the tracee state after the notification
> signal and can't expect it to be in TRACED. Please consider the
> following scenario.
OK, agreed.
> > Hmm. And afaics there is a bug in do_signal_stop(), after
> > "[PATCH 6/9] job control: make task_clear_jobctl_pending() clear TRAPPING automatically"
> > ->jobctl &= ~JOBCTL_STOP_SIGMASK is no longer safe. We can clear _TRAPPING
> > without wakeup.
>
> Hmmm? ->jobctl &= ~JOBCTL_STOP_SIGMASK clears lower sixteen bits.
> All the flags including TRAPPING live in the upper sixteen bits.
Indeed, I was confused. Thanks for correcting me.
Oleg.
--
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