Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp1133427lfv; Thu, 14 Apr 2022 08:22:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzanRxvCMA1oWRawGKhJnCL5E8/YvPbTgmpgc6CP8ZhefIBbeALzP18hoeP70Zrufq+UKzU X-Received: by 2002:a17:902:8c82:b0:158:b701:c2a4 with SMTP id t2-20020a1709028c8200b00158b701c2a4mr4098795plo.66.1649949610924; Thu, 14 Apr 2022 08:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649949610; cv=none; d=google.com; s=arc-20160816; b=gWP02XMx4O+hMEqvMgalnDnNJDPJXkYO6axB6kx+hFNtX/XHLF0ed3ThdGwYD67Uii 1rwyLhUQuL0Du97ldsJt2u3qct/KHm0++8Utc2ELCEh1lYVv8TcUgJmFjfEhn1dcsEBQ ZCmnwzlQr+1ivJYhXFxixv9PdF5MmRXRAg2hL2dypYdgopQDF7m/JtB6hmXjxm48oA9y 4JCm7RK1MgzrpWllkSgtuJtdTLOe2Nx8nWKToyGYNh5xf/Yi6qzzRWLLPwl5Ob9qAHXA tIx1c6yDSWfJLv31GT517KRomvPh5cXt0tHj8YseoHSpfpZSEPa/PONAQ8TNfH41d3uy av/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=jePF+LAlrZY2/MlviRtzxuX6DXExsTmifHJyr3S1mXY=; b=CmFrCc77zu9R0bWdbeVIm+2hQot0bbWxt9HEx04Jbm9dyDhmTvI07cnDbsN3+A4wlu ARkweeyrtf3fKVtO37Rol/AK4OGJzdXeoOS2jEvpGJGxWrhM+FgcWYwiKdb2xsmvHlzg Y7k5aqmvjsASGBx+2ppIrCJVcpq8DIiZPTyZUmYZ4KrLzSgqUHxIKdT5VEkeP10D/VAr gs6Al3AtiZ5Bz6HbM9PTvSj23Lxb0n7M79iD8wBPwOVcSrke7XA8VssRAlLKra4+EHuE CF5asrsrW0WNuOieHOuyN2D4nW92Kw3X9Xy0FncpcuiLO/BlO5c9t013083iQz9lQZMk NtAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Jl64X2Rq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p20-20020a170902b09400b001583ec38334si14502254plr.533.2022.04.14.08.19.53; Thu, 14 Apr 2022 08:20:10 -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=@redhat.com header.s=mimecast20190719 header.b=Jl64X2Rq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237866AbiDMS7o (ORCPT + 99 others); Wed, 13 Apr 2022 14:59:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237863AbiDMS7k (ORCPT ); Wed, 13 Apr 2022 14:59:40 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C0D26C94C for ; Wed, 13 Apr 2022 11:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649876233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jePF+LAlrZY2/MlviRtzxuX6DXExsTmifHJyr3S1mXY=; b=Jl64X2RqQkY+q9IJsw0Qu6LZYyw+cN1pUuoOHCdH4lIVtinmS8Y+/yo6ZRfQ3K4ghviHrX Yr9rEOKymZFg9UPSMXeNL6G1y+X4rcnTreckdEFDC8eM76q6xuUrwb37SfbxYH6g1VNs7w wT8GclnxUf6NjJxleuGjvkUHWScLzkk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-221-tPSen3hIMfiy-CklOwv1cw-1; Wed, 13 Apr 2022 14:57:09 -0400 X-MC-Unique: tPSen3hIMfiy-CklOwv1cw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F168C29DD9AC; Wed, 13 Apr 2022 18:57:08 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.40.192.129]) by smtp.corp.redhat.com (Postfix) with SMTP id 32B191457F23; Wed, 13 Apr 2022 18:57:06 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 13 Apr 2022 20:57:08 +0200 (CEST) Date: Wed, 13 Apr 2022 20:57:04 +0200 From: Oleg Nesterov To: Peter Zijlstra Cc: rjw@rjwysocki.net, mingo@kernel.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, mgorman@suse.de, ebiederm@xmission.com, bigeasy@linutronix.de, Will Deacon , linux-kernel@vger.kernel.org, tj@kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 2/5] sched,ptrace: Fix ptrace_check_attach() vs PREEMPT_RT Message-ID: <20220413185704.GA30360@redhat.com> References: <20220412114421.691372568@infradead.org> <20220412114853.842942162@infradead.org> <20220413132451.GA27281@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220413132451.GA27281@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 04/13, Oleg Nesterov wrote: > > I like 1-2 but I need to read them (and other patches) again, a > couple of nits right now. Sorry, didn't have time to do this today, and now I am already sleeping. But... on a second thought, it seems there is a better solution. If nothing else it is simpler and doesn't duplicate the wait_task_inactive() logic. How about the patch below instead? On top of 1/5. Yes,yes, incomplete. in particular see the "!!!!!!!!!" comments. Just to explain the idea. Oleg.