Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp489354rdb; Tue, 16 Jan 2024 06:46:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHgZbNNJ8xHjekhmL6/6silPpu6MNwEfJt5havYUaLAxTKFy78VdHhsVpyf453t0C9Odr/Z X-Received: by 2002:ac8:7d45:0:b0:429:89c7:62f0 with SMTP id h5-20020ac87d45000000b0042989c762f0mr9453978qtb.107.1705416404310; Tue, 16 Jan 2024 06:46:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705416404; cv=none; d=google.com; s=arc-20160816; b=ushiEq0NYDwXqeQwxTw4okuo6bUSjFM0OWat7maekQp2LBc4QsbvQ+GSbBxkbD7dyR QS75LiY5g9u4yd9VwuEA7M9EYAxJzwDVLY8jIPjAbqrVAS2jWzwBnQu0CoyWNbYBr8HL 2Qf+VJBsYHOZKIOM3awm0YxCQs3/piFgWL7HtJU8DmsWUIaHUnkFw/yrS5yjBaYJGZzR GyB3rz3g4QvYFzFL8SG6FK7FUfUIyVy5xBqqpUOkqJBp+0VzMMfmjHCVRBtHceqAMm/H hPezN0EKGmJ/lvL9mIY7dv29G19dBzuCXJzJXuiw4ztzliUvfPKyhBPu8ekW9kX8vzaK r0Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=eLGkeF3QQbjCQ+UVYNssoPlXROoQCdjE1WB9zExwudg=; fh=8k11GorTnm/0G8r54LTvegaRIPU4OrY2W+3A22l/vSU=; b=r6vGTX/7oit3efJ8aCpFFuJ7WefI4PlbtYOn2vAPtJi7Sa7GZyVmOX2hBEdNyJw4ib bVPiTBCcu7637gDB3/Y4YqPtJBqFkQHold8bXjs1CpqPC1oBu+0TNtEta/yP8xaHb1ls 475PvRBtA1EpRwRIPCub0M9r1lGyCe4eOblFzzda4JW3P2tFvsl8scLjEfFFadNhTdBD IbwftAwwdDNgBY5VzGISEB1QKAvtEhcqyGoo/Q1LanlaatBA2EWDVc2AaiplXGM38tzx +TZ5HOi5zMIns1uq9/xNLSXufNj+TCHeNnLEBY+OLLJFcU0Ye9+oHXxfRwVy8ZxtK8fn NmLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iVC3b0ok; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-27477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b2-20020a05622a020200b0042977560a47si9981399qtx.340.2024.01.16.06.46.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 06:46:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iVC3b0ok; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-27477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 150BE1C2351C for ; Tue, 16 Jan 2024 14:46:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1B801BF35; Tue, 16 Jan 2024 14:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="iVC3b0ok"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="43TBKCHg" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F5101BF22 for ; Tue, 16 Jan 2024 14:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Tue, 16 Jan 2024 15:46:32 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1705416394; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eLGkeF3QQbjCQ+UVYNssoPlXROoQCdjE1WB9zExwudg=; b=iVC3b0ok3unOQso05GJlZuVtZblbvHX3UH38rC56qCQKQ0pGsTTzKQwe8SULqrn0HFv8bU XhvmpxrH0PG2dXcubnW+gOq+2dzMR4BnUVAE4LmXw0I54By0w8XUW8ktOLM3U2NbtdNsop CZVR5iZfFs9lzOZqKuN3ipu45RJzXH87XYkSzrWdjkuFLHqIgE1cWMxKCeGc/+vmL3oeAe XkpcUqyDqeA9d39ZRcCzFuFWugjQl+qje9a9t4lgr/3M5w/z7YWjHlUkDIbS73KMULiO70 pz+Gp+iI5qz1kWJ/R5BkGpk6YPFpkh7awHtFUP5lOGFWIoYv8YWP9BlgLsiLBA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1705416394; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eLGkeF3QQbjCQ+UVYNssoPlXROoQCdjE1WB9zExwudg=; b=43TBKCHgLs8d6duRUpMSoXM9pWSP+peN7Mg6ht4Ik+uUipJU0wGm+3dNFUETJAW4qMoqrh 0An4ROxlL5iQsfCA== From: Sebastian Andrzej Siewior To: Jiri Slaby , Peter Zijlstra , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, boqun.feng@gmail.com, bristot@redhat.com, bsegall@google.com, dietmar.eggemann@arm.com, jstultz@google.com, juri.lelli@redhat.com, longman@redhat.com, mgorman@suse.de, mingo@redhat.com, rostedt@goodmis.org, swood@redhat.com, vincent.guittot@linaro.org, vschneid@redhat.com, will@kernel.org Subject: Re: [PATCH] futex: Avoid reusing outdated pi_state. Message-ID: <20240116144632.cDj3SolO@linutronix.de> References: <20240116130810.ji1YCxpg@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20240116130810.ji1YCxpg@linutronix.de> On 2024-01-16 14:08:12 [+0100], To Jiri Slaby wrote: > --- a/kernel/futex/requeue.c > +++ b/kernel/futex/requeue.c > @@ -873,7 +873,7 @@ int futex_wait_requeue_pi(u32 __user *uaddr, unsigned= int flags, > if (res) > ret =3D (res < 0) ? res : 0; > =20 > - futex_unqueue_pi(&q); > + futex_unqueue_pi(&q, true); This obviously needs the same change as futex_lock_pi() unless it is okay to avoid the argument and remove it if it hasn't been removed. I forgot that the requeue path has also signals & timeouts and so is subject to the same problem. Assuming we go that direction=E2=80=A6 > spin_unlock(q.lock_ptr); > =20 > if (ret =3D=3D -EINTR) { Sebastian