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 D2EC248CD70 for ; Tue, 4 Aug 2026 17:32:34 +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=1785864758; cv=none; b=LX50mYnI7Hr4rmYSaprI9jIWwhenp4bs5GX2lwmgGnp7yQSLY7A74A4upsXUim1Y1jsAvSoHXKOdjATW04xXbiGLEs03TABZWvJ09ZnSPvh9loYGDey+82Z6DT/MV75NB3+ah4wd/QZuSrLYRVnEVKK8pTCMwO3xyY9oHClVyMo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785864758; c=relaxed/simple; bh=5KDJcwuAnaHb3QcdR5snjShJg9sqFXZga0HKBIVrCLA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YQGFvfdPaGTByR/4YGh59NqsLPuWolysqqtQiHb2goAQLBGDaH5e21yipTaQP9byPsuIOwXHvw/d/zpkawxwTIuhFNWcInbUBobZwqY8P2OlfFhA9JvwtLalZWAy1Z1GcyX9VRJQqh7Tmvb/K5EMl3/yd+VTMK/zX0tKqjJ+eN0= 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=i5UPL5LW; 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="i5UPL5LW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilvokhin.com; s=mail; t=1785864752; bh=NPrnV5d18VUbBbdUHXq/8GFtuNqT/ey7S5BrYlina74=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=i5UPL5LWScrATVxwQKStftd/KdMQA5qL8OGhvS8VXlIpWLXfd0dA3RyWO1iDyBUQX WBJifuDZosahE6uD51xCh+X08l9+m3KkUOoehsLkGh2iqw/726NyK/lpHZM7LtXLbk EX2QEIu/GAZylRHe/hJRndLhXZ/nX54Kl9GEhpL8= 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 D0CA1E17F5; Tue, 04 Aug 2026 17:32:32 +0000 (UTC) Date: Tue, 4 Aug 2026 17:32:31 +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 , Will Deacon , Boqun Feng , Waiman Long Subject: Re: [PATCH RFC 8/9] rtmutex: Use accessor for hrtimer_sleeper ->task field Message-ID: References: <20260731004019.3530210-8-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-8-paulmck@kernel.org> On Thu, Jul 30, 2026 at 05:40:18PM -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 rt_mutex_slowlock_block(). > > KCSAN located this issue. > > Signed-off-by: Paul E. McKenney Reviewed-by: Dmitry Ilvokhin