Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp522444imn; Wed, 27 Jul 2022 12:32:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sYLd0erOVT80bOdFk5XgzQSNgdJSiXc5XpXNIxnZaPTG1WUMAQB4R73pYz33Bo/vCEFTEA X-Received: by 2002:a05:6402:42d5:b0:43b:5cbc:eeba with SMTP id i21-20020a05640242d500b0043b5cbceebamr24268248edc.3.1658950334817; Wed, 27 Jul 2022 12:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658950334; cv=none; d=google.com; s=arc-20160816; b=CKUH35NWLDql2H7drLQW27myDinIXGDfW7TX3/nRvW1WiqybTkBkmNuh+dPW6j0S2N GLkXr2lhiBW7rLDmYGRQUuEpyXlY03wCJxhNAzTSUvTB0u6CtS6x/eSFGBzr7zxL1ax0 iRkVDb4GOnrN1v9jhOL2+sRVPvWBiAc6zmBDwg3Bnoj3HLDJLGqOdpCYSsSZgPLnHX8f z5mF2FnLeohwRgWt4U8K6RR+sjF8mIq3GPw+VEQpoaY4VsdysVbvr1Vtwy8945xDO2x0 CrLObvOmTQto92ppWIkeRv+c3OvzHkKn/5wIqVVtjhU7L4kqFqgQCdBX/KfrDOlbPcOt xAbw== 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=9nlguriVegmCgPjHJ3kVuWSfSUtVD/Ss4LeGmS2Ww38=; b=yPtYwaEbSwJgPug5IJvAz612/ztKn0E9rTOc/fANMFz8xOcCmnzNNNWrtDs/bhC4sp Q5ZloLhn8GWWLrQRjshXKDONv1KQ3aVgn9EGnU2GrQYQFjJDmxu5rN2dsujMNRpX5FjU BikXvhUJwFOwy/Tu4ohzdMWMu61KUHkFaaD9q4j4rwC8JKix/FFe9Co6ye/DaoKWNBAM rmKMbhzrTF371Df90W2X73Skkx06UGNMfVsXrDDVbaW3zvRmeZnqRSnkGr4lfWMpeHYU +liLvh1mNKZVHi7nRm4ZAf+6MsmTF66rQQk7yg2EhFSVkVlS5/J+jh+hacsXCVrZjJO5 g5Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=b1EcrmOd; 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 k21-20020a17090632d500b007269615d162si17754532ejk.236.2022.07.27.12.31.50; Wed, 27 Jul 2022 12:32:14 -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=b1EcrmOd; 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 S237281AbiG0TWQ (ORCPT + 99 others); Wed, 27 Jul 2022 15:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237345AbiG0TVl (ORCPT ); Wed, 27 Jul 2022 15:21:41 -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 0957DE4B for ; Wed, 27 Jul 2022 12:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658949596; 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=9nlguriVegmCgPjHJ3kVuWSfSUtVD/Ss4LeGmS2Ww38=; b=b1EcrmOd6OGH2vrKgoasnO1zBCZn/BHp6VjdsdOr3B0RBGhnKPumQChG+0FRq8ikxajm2S QSZyzHp54bzM+azg1iZtgthxCQCmBDNfc7vpnpz1OiX8laIVTVh6B2rvzepsCi4UmnWo6w 3+GT5mmWCWo3IyG/pKWV4NPVZymanHU= 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-489-MuZPaS_KNQGo6zWtw0VHKA-1; Wed, 27 Jul 2022 15:19:53 -0400 X-MC-Unique: MuZPaS_KNQGo6zWtw0VHKA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2F9A01C13945; Wed, 27 Jul 2022 19:19:53 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.40.194.193]) by smtp.corp.redhat.com (Postfix) with SMTP id BE353492C3B; Wed, 27 Jul 2022 19:19:51 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 27 Jul 2022 21:19:52 +0200 (CEST) Date: Wed, 27 Jul 2022 21:19:50 +0200 From: Oleg Nesterov To: Tycho Andersen Cc: "Serge E. Hallyn" , "Eric W . Biederman" , Miklos Szeredi , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched: __fatal_signal_pending() should also check PF_EXITING Message-ID: <20220727191949.GD18822@redhat.com> References: <20220713175305.1327649-1-tycho@tycho.pizza> <20220720150328.GA30749@mail.hallyn.com> <20220721015459.GA4297@mail.hallyn.com> <20220727175538.GC18822@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, 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 07/27, Tycho Andersen wrote: > > On Wed, Jul 27, 2022 at 07:55:39PM +0200, Oleg Nesterov wrote: > > On 07/27, Tycho Andersen wrote: > > > > > > Hi all, > > > > > > On Wed, Jul 20, 2022 at 08:54:59PM -0500, Serge E. Hallyn wrote: > > > > Oh - I didn't either - checking the sigkill in shared signals *seems* > > > > legit if they can be put there - but since you posted the new patch I > > > > assumed his reasoning was clear to you. I know Eric's busy, cc:ing Oleg > > > > for his interpretation too. > > > > > > Any thoughts on this? > > > > Cough... I don't know what can I say except I personally dislike this > > patch no matter what ;) > > > > And I do not understand how can this patch help. OK, a single-threaded > > PF_EXITING task sleeps in TASK_KILLABLE. send_signal_locked() won't > > wake it up anyway? > > > > I must have missed something. > > What do you think of the patch in > https://lore.kernel.org/all/YsyHMVLuT5U6mm+I@netflix/ ? Hopefully that > has an explanation that makes more sense. Sorry, I still do not follow. Again, I can easily miss something. But how can ANY change in __fatal_signal_pending() ensure that SIGKILL will wakeup a PF_EXITING task which already sleeps in TASK_KILLABLE state? or even set TIF_SIGPENDING as the changelog states? Oleg.