Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp582980lqp; Wed, 12 Jun 2024 09:57:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVDYxqaPkWfdokL1rIwKByMrAIy07P1XVyL1Fll8O5Gm75AzocVstVOK9MBEtZM71ZLXg1txu1yH5WFTVvOCPrTNYX+pNWkFeS9iG5BdA== X-Google-Smtp-Source: AGHT+IF+Gq3+IVPDyPP40WkE/46X+qhzKBvanRif+67NbdyLM/Xfl1fG1GpnYd6BKy98qmvN7F1y X-Received: by 2002:a05:622a:1ba2:b0:440:5a86:ef77 with SMTP id d75a77b69052e-4417aa2579cmr3657671cf.25.1718211464173; Wed, 12 Jun 2024 09:57:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718211464; cv=pass; d=google.com; s=arc-20160816; b=tX4SIZ1haPkdbVr7lbmHAYeDGr2QWMk3owmAdUDCy5IF0qYmZ10XbMu/T3qUlR5bx1 IgumagBHmrMubREkYMzVSBZGom6bnB2kLjnHh6Y47+GaMOCZHLlnEWbbhToMl1+D9naf 8MNG9oS5w0PQLZU/gYZ/y5QFse+wjSIwJKuUkeKu02Q/pEm+jrdy1Edw27ymovGJhnJN HRFn9M/g6ZuwTs6uNaHyTXLYT8jEoJre2vJRnzCBRxhUr6XAGypb11UdXZVAHiu6Mssb WgUrufosZeUnUIA8IZ0qtN/VTRWiHqTY18duWv8/AHuv8abZRnjhMtmtGVtjEJHzhPZ/ Do+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=pAftVLKn20HbmalpH3Tni7KQXwsU3yAXAUhGqIphnu0=; fh=F+66Bw07PiwtXaWhJM1NHY2jvhGNOD9XuYeshaW+Io0=; b=eqtd2By0gPG82v9gjBaz+mzdpPAf9UH/gwVL+fU30CWUr3AkuJCK6o5VA5yQapeqUD hMPuySGdw7jJaIXsSRrhL/qXpHjC+0T5vMu830iHJJl2+UHsGCSo8bRNnvT5Hm8iGmDz Djkk4wp2nSvCEk/ZrMndxtsvJnogVX/zjpJ2UWiFQKsXefnRzuEbgCWupuSLbqeLBN4B bwQz6MYPra9WIstz5cGNi9GqxbQHLf6m9khrYYxKvj4HZxJEWw7SExXKePGckGNi1Clx tP4Mv+ZH6BzfuuObzrgKWpMhANS9lpf7ID9+FqmEhI7qKMikx+RtfDIni2QbG25ENSgG MONg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=d+l1Ih95; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-211946-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211946-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-44038b7c5c5si145349071cf.730.2024.06.12.09.57.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:57:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211946-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=d+l1Ih95; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-211946-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211946-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DCA581C21130 for ; Wed, 12 Jun 2024 16:57:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D7FFE181BB3; Wed, 12 Jun 2024 16:57:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="d+l1Ih95" Received: from mail-oa1-f53.google.com (mail-oa1-f53.google.com [209.85.160.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CACA17B437 for ; Wed, 12 Jun 2024 16:57:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718211457; cv=none; b=lIV5j7rkyhGYXeF3c8XGOrHoBakQI0XkqB9XEAbgCEaPY+gunTFeh9RNo842hqFf2za4xZqX8KI4QYYFRvX7VAWuo2UTwatGfsZSE0pkUcULbeYSirVADEgXDzX7JsTsTt3NxW5bVRFkjB/WVEkLXdARbRNosWGHUdGbJE4B6fE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718211457; c=relaxed/simple; bh=vebMEaW02jolhLdtvQPmHMC1OEEbWYTVGy+Bor5wYMg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DL9hFKU6RG5pmCFrccmny0V16dcBmUWU7fVlYIUG4PgQ6BN3B1f6wRZ5XKcrcCXbaBVZ5Jj5TPLA3MEogAZyIonPnm9VrUs5H3hvRbsEZbcAbR3M1yuX5gDUqugp9AgfXBSUxTd9lQGj/Nt1XJa+Frsm3nII6iCZ1K3w8bnlJLU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=d+l1Ih95; arc=none smtp.client-ip=209.85.160.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-25075f3f472so485fac.2 for ; Wed, 12 Jun 2024 09:57:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1718211454; x=1718816254; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pAftVLKn20HbmalpH3Tni7KQXwsU3yAXAUhGqIphnu0=; b=d+l1Ih95QeAlRyz0HNZpXALgmOEuWDHQFwfysCuMSY3ZA40F08jSQrUmTx2gl8Mbi+ qAETXqgkSFv7duiRBXhNNElzK1VVoCXfv2y/XbbyBeN+a1ELF6YOq1oisGmpkBIKFg0C lJs+G9IaBI2Jo3r42Kh5/Q+/2ekT/FTHoR3aMcSN7Ct9U9td6I34ihp3783vBaahWA1a xRNBvWtFrMdMiIQXMR1HdrW+t68KdtxtXG7LqNhNB7eEyyv2SnHKIax2Eegwp140t4Z3 cJqKx4WWpXv2EYYO9vP5miFNt2qW9C3Ff04UoqH73lraY9p+yp4q3CJdltjhgBC0WfKW px5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718211454; x=1718816254; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pAftVLKn20HbmalpH3Tni7KQXwsU3yAXAUhGqIphnu0=; b=biys723R+9IJ4tDEf3OAaSRycdKj41PeGPk6+98OuaS9DAhDmdH0nrfqES//ct6N/4 p7TYiXg9vxhoBgEuVCCPCwkA3RVTVYN9UE07iWAoNpYmsJhFeNqc+azaVZ5sNGxVIrEN fJtbdmdLDBsDfnT6Jst4D7P0FVHT5dtlX7Vg1yS92JyTNlmUq3GA/6hs9FEtCZS23yCz JF8epS/EEe7BIQnc5H3QL3dUY3enqKRx/g0dfxYXuKrh3ht0DII5qc+JZoD0Ae5PNdFd iSxvKaPqelOBUN5EPGc5PD18t77+n79zioHkZQZheVD7XiHIakaVUXr0bLttEVhL0tKa 9KUw== X-Gm-Message-State: AOJu0YyxDTtoroSnxVagHk+gKtxMLNeFOReTRYktrnEXoL8iEy1hmOeq Rvhd7JM8oYtCPSfjPqGnTbR3vI4ShpbaS4f/4eEkrjtuLkhwJk5gumsqavzUT/k= X-Received: by 2002:a05:6870:818f:b0:254:affe:5a08 with SMTP id 586e51a60fabf-25514c7026emr2515800fac.2.1718211454633; Wed, 12 Jun 2024 09:57:34 -0700 (PDT) Received: from [192.168.1.116] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-254d96e5e7fsm1377401fac.26.2024.06.12.09.57.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Jun 2024 09:57:34 -0700 (PDT) Message-ID: Date: Wed, 12 Jun 2024 10:57:30 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] zap_pid_ns_processes: clear TIF_NOTIFY_SIGNAL along with TIF_SIGPENDING To: Oleg Nesterov , Andrew Morton , Rachel Menge Cc: linux-kernel@vger.kernel.org, rcu@vger.kernel.org, Wei Fu , apais@linux.microsoft.com, Sudhanva Huruli , Christian Brauner , Mike Christie , Joel Granados , Mateusz Guzik , "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang References: <1386cd49-36d0-4a5c-85e9-bc42056a5a38@linux.microsoft.com> <20240608120616.GB7947@redhat.com> Content-Language: en-US From: Jens Axboe In-Reply-To: <20240608120616.GB7947@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/8/24 6:06 AM, Oleg Nesterov wrote: > kernel_wait4() doesn't sleep and returns -EINTR if there is no > eligible child and signal_pending() is true. > > That is why zap_pid_ns_processes() clears TIF_SIGPENDING but this is not > enough, it should also clear TIF_NOTIFY_SIGNAL to make signal_pending() > return false and avoid a busy-wait loop. Reviewed-by: Jens Axboe -- Jens Axboe