From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ilvokhin.com (mail.ilvokhin.com [178.62.254.231]) (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 42296377561 for ; Tue, 4 Aug 2026 17:29:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.62.254.231 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785864562; cv=none; b=prOk90UNn1TjCrxz5AmF9vcj9psbsykskbgb2wa8+jIJG24FocaSFQDEhW9WPFFQPv+v2lL2xiQmWXN25zTTRhC2Uu8NcBO+rdLhq6vJf48OyFHv7w5p8KJfKxpMuuwZqj3+LGMz/xTLzyzZ6CdbtBQTXvdWiodeMwNhxu5Jvok= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785864562; c=relaxed/simple; bh=oHOq4D5OOd/IofOHUgL/q+4YCPZd4ImIhcgCMQSgrqI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kGCDDmySpfgQqkdCYwwVRZoXiC3melV7fngfmudZ/eb0nEDmvwJ9bhpaHivA/k8p5gqRHdi3ObAJexSfTwxzc9Ulr+6a2DFg16UdhWywuBADyj+vvG6wFKbpv9arACesCLwG7ycRqAW7sdHDvEhD6DDuR50RBwV2lCWTMHZo/i8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ilvokhin.com; spf=pass smtp.mailfrom=ilvokhin.com; dkim=pass (1024-bit key) header.d=ilvokhin.com header.i=@ilvokhin.com header.b=xJQg+npB; arc=none smtp.client-ip=178.62.254.231 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ilvokhin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ilvokhin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ilvokhin.com header.i=@ilvokhin.com header.b="xJQg+npB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilvokhin.com; s=mail; t=1785864559; bh=I1+Aj2GZkbTL4IPBkk6oMKKn8OO/sGfgcGJpqR3dgh0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=xJQg+npBu/MOljgTU7c52gC34IMSnJsj+x7Hef4WubHVFFJMEKQzSYnGPZvTwPM9z 2BlzcYld5xnBfESLkMReZ2VgamMYA72qlJ7rDHQ+IVzWRYHiCwWsXHsDbMKe3+Fm4g TQmqTnav344Ay04/2xjvXUr996lMJ+PVARi7ZeRg= Received: from shell.ilvokhin.com (shell.ilvokhin.com [138.68.190.75]) (Authenticated sender: d@ilvokhin.com) by mail.ilvokhin.com (Postfix) with ESMTPSA id 5E209E17ED; Tue, 04 Aug 2026 17:29:19 +0000 (UTC) Date: Tue, 4 Aug 2026 17:29:18 +0000 From: Dmitry Ilvokhin To: "Paul E. McKenney" Cc: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , "Peter Zijlstra (Intel)" , linux-kernel@vger.kernel.org, kernel-team@meta.com, Ingo Molnar , Darren Hart , Davidlohr Bueso , =?iso-8859-1?Q?Andr=E9?= Almeida Subject: Re: [PATCH RFC 5/9] futex: Use accessor for hrtimer_sleeper ->task field in waitwake.c Message-ID: References: <20260731004019.3530210-5-paulmck@kernel.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260731004019.3530210-5-paulmck@kernel.org> On Thu, Jul 30, 2026 at 05:40:15PM -0700, Paul E. McKenney wrote: > The hrtimer_sleeper structure's ->task field is used as a flag to indicate > that the associated hrtimer has expired. This means that the hrtimer > handler can be storing to this field while other code is loading from it > to check for expiry. Note that additional races appear for hrtimers that > can be restarted, which could be argued to be a user error. However, that > is no reason to let the compiler introduce additional confusion, and to > this end, the hrtimer_sleeper_task_get() was introduced, use of which also > has the benefit of avoiding open-code access to hrtimer_sleeper innards. > > Therefore, apply this accessor to kernel/futex/waitwake.c. > > KCSAN located this issue. > > Signed-off-by: Paul E. McKenney Reviewed-by: Dmitry Ilvokhin