Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1495500iob; Fri, 29 Apr 2022 06:40:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz98lDCHm9ActrE/dDWI59suIwbJ81KkXFbXYiGkom97owyIIooHc/9BLpHi+Z/1POTWaor X-Received: by 2002:a17:902:cec2:b0:15e:776d:3257 with SMTP id d2-20020a170902cec200b0015e776d3257mr3799611plg.105.1651239615632; Fri, 29 Apr 2022 06:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651239615; cv=none; d=google.com; s=arc-20160816; b=KcOxKr0aaEByTXD7KWaCzctqMYcpoO65jXH+jonUGbFk8wpARuM0IyZ3bit5BYXNRp 9m9tQf79CSk5SC9yb4KXmGgxfEgP7xVbZrqrMps91pdzj+pNdMgGqOhs2/pAnqft0eJH oklrku/W+Ki46E05CTSvCIEABlQvgkSRLZVSZNoc7opza5Y8aYcmzQ6p4Ryrjl+EZllp k1CEDV9kXz+pijBLFG1DSuCLolGQ0SsgrUBoQBBsVoG10Jy5USw276hUKPSksuYnSo3W jf6y21jgoFmo1momMe3r/gqFwp9H8mSIS5dByqlhDtYkwAdD5Npt4Rp8bw+X1NXwwV0V yV2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=R62ztCNoV8ChqPdJ+dpLt5IfFlHmt2IS8Kc2/i1kepg=; b=rbGOCjRuzDS11oQETZmmCuFBiqqgojJRF8qJ6Dr6Nrd1QKOYlRjXwjnrVHisGHDuBz zDncaqi/ewggsy3Nad10a7BfGsb3i2MLhku9AazTVHAzmesLe2NLWro+z2AU3QMPBJLE C4XpqWC07xEY+RBfbeZM/XeNW/y6URpdtMjbhUqV3RcPgioFw0Oqmn/cjCR+EJlhBdH3 vWYwrJfy5LreDKxXrFMdZ+OERxbZaGzy9ThhBaOYxDi9rYmC37uTrWAt/HQ9u7GxDpfq ICHYFyBK/+gZ5iOqu3AIUTRF6KAeHZVN09jewtvkpKwoO37qAoM4u/WVTSOnNFQYqX1W bdMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=i7t5whAk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl16-20020a17090b385000b001d97cb4fb82si8341015pjb.43.2022.04.29.06.39.58; Fri, 29 Apr 2022 06:40:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=i7t5whAk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347805AbiD1N6K (ORCPT + 99 others); Thu, 28 Apr 2022 09:58:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347769AbiD1N6G (ORCPT ); Thu, 28 Apr 2022 09:58:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BE5AB42F1; Thu, 28 Apr 2022 06:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=R62ztCNoV8ChqPdJ+dpLt5IfFlHmt2IS8Kc2/i1kepg=; b=i7t5whAkbkW/BnfOOxP/WF4QOX DFg4OPTQw52j+VH9MtvwcprXopXcr35w5WIBl4xjv+WeouufjdicP+P9H6wndUfTZ+ZzOhiXOVEX1 nIsx+1/LnVwmH78AHc+Pgk0aBOwQsoTwK9Rv5aQmamuikPdaBWMnZkYxGvMuCOlC2GjZvPIjlE3OG p49qb+LKzmH6Ww7wByliN12ueFBKxk+Ar6Da0b71bpEF8yMQtlwnDSDCQwaa9C2gTZToRUV1nMPPY i4HYepPYBd2ADc7Pb5v1kxbtJBCIkxj4aDBEENAndZzBsseSgTRLa8F2tooreC8vHb33qhpISMfNM u5uCIWQQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk4bD-00BYlh-1m; Thu, 28 Apr 2022 13:54:27 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 208FC3004B5; Thu, 28 Apr 2022 15:54:26 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0B4A220296EED; Thu, 28 Apr 2022 15:54:26 +0200 (CEST) Date: Thu, 28 Apr 2022 15:54:25 +0200 From: Peter Zijlstra To: Oleg Nesterov Cc: "Eric W. Biederman" , linux-kernel@vger.kernel.org, rjw@rjwysocki.net, mingo@kernel.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, mgorman@suse.de, bigeasy@linutronix.de, Will Deacon , tj@kernel.org, linux-pm@vger.kernel.org, Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org, Chris Zankel , Max Filippov , inux-xtensa@linux-xtensa.org, Kees Cook , Jann Horn Subject: Re: [PATCH 7/9] ptrace: Simplify the wait_task_inactive call in ptrace_check_attach Message-ID: References: <878rrrh32q.fsf_-_@email.froward.int.ebiederm.org> <20220426225211.308418-7-ebiederm@xmission.com> <20220427151455.GE17421@redhat.com> <20220428111911.GA3804@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220428111911.GA3804@redhat.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 28, 2022 at 01:19:11PM +0200, Oleg Nesterov wrote: > > That is also the reason I couldn't do wait_task_inactive(task, 0) > > Ah, I din't notice this patch uses wait_task_inactive(child, 0), > I think it should do wait_task_inactive(child, __TASK_TRACED). Shouldn't we then switch wait_task_inactive() so have & matching instead of the current ==.