Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752531Ab1BNUKK (ORCPT ); Mon, 14 Feb 2011 15:10:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20691 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751129Ab1BNUKI (ORCPT ); Mon, 14 Feb 2011 15:10:08 -0500 Date: Mon, 14 Feb 2011 21:01:30 +0100 From: Oleg Nesterov To: Denys Vlasenko Cc: Tejun Heo , Roland McGrath , jan.kratochvil@redhat.com, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org Subject: Re: [PATCH 1/1] ptrace: make sure do_wait() won't hang after PTRACE_ATTACH Message-ID: <20110214200130.GA21559@redhat.com> References: <20110204105343.GA12133@htj.dyndns.org> <20110207174821.GA1237@redhat.com> <20110209141803.GH3770@htj.dyndns.org> <201102132325.55353.vda.linux@googlemail.com> <20110214151340.GP18742@htj.dyndns.org> <20110214175144.GC15847@redhat.com> <20110214190141.GA19221@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 868 Lines: 23 On 02/14, Denys Vlasenko wrote: > > Basically, we have TASK_RUNNING, TASK_STOPPED and TASK_TRACED > states, and after entering TASK_TRACED state we lose information > in which state we were before entering it. We need to remember > old state and restore it in order for this example to work. Actually, we do not lose this info. So the kernel can change it back to TASK_STOPPED after ptrace(PTRACE_CONT), and this is what PTRACE_CONT-doesnt-resume-until-SIGCONT was supposed to do. > Or we can avoid entering TASK_TRACED on ptrace(PTRACE_GETSIGINFO) et al. > Can we remain in TASK_STOPPED? Oh, unlikely, I think. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/