From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753865AbbKWXF6 (ORCPT ); Mon, 23 Nov 2015 18:05:58 -0500 Received: from mail-yk0-f178.google.com ([209.85.160.178]:33220 "EHLO mail-yk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752166AbbKWXF4 (ORCPT ); Mon, 23 Nov 2015 18:05:56 -0500 Date: Mon, 23 Nov 2015 18:05:52 -0500 From: Tejun Heo To: Oleg Nesterov Cc: Andrew Morton , Andrey Ryabinin , Roland McGrath , LKML , Pedro Alves , Jan Kratochvil Subject: Re: [PATCH 1/2] ptrace: make wait_on_bit(JOBCTL_TRAPPING_BIT) in ptrace_attach() killable Message-ID: <20151123230552.GJ19072@mtj.duckdns.org> References: <5640B7F2.70406@virtuozzo.com> <20151119184709.GA19061@redhat.com> <20151119184732.GB19061@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151119184732.GB19061@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 19, 2015 at 07:47:32PM +0100, Oleg Nesterov wrote: > ptrace_attach() can hang waiting for STOPPED -> TRACED transition if the > tracee gets frozen in between, change wait_on_bit() to use TASK_KILLABLE. > > This doesn't really solve the problem(s) and we probably need to fix the > freezer. In particular, note that this means that pm freezer will fail if > it races attach-to-stopped-task. > > And otoh perhaps we can just remove JOBCTL_TRAPPING_BIT altogether, it is > not clear if we really need to hide this transition from debugger, WNOHANG > after PTRACE_ATTACH can fail anyway if it races with SIGCONT. > > Reported-by: Andrey Ryabinin > Signed-off-by: Oleg Nesterov Acked-by: Tejun Heo Thanks. -- tejun