From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (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 3F0C1313545 for ; Mon, 3 Aug 2026 15:21:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785770491; cv=none; b=ZKNtJz92kIaM++weHo3SkSFE1zzeo9c6bjAikwbkk56IPvhTE+BYpXV9HqAFV8iEX8+/uON/yqmbuOCeYWpPB/ZlClnFyw5ZK9psJKrNNafLjV2WEG1moqbQLgOTtu4dJzNPt6f+sO8R1+khIJl1sSO7c5v6XpupzWth44o0NaU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785770491; c=relaxed/simple; bh=mqxPNEZSATnXflksdlGrgJL0uGIRhgRwfaJWC4WnIOs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BtV2UYPMtVBY0croEBVr6k7nJtD59rjkp6pqp6Dy/86g6dqSGZS79gBipWUM+kyTcKWnMZpeFo/iUskMBhxgk2jsdOPcp2712GaIvIAqzcqw7YK49sSaq0nsGxSVJi7Yzl5iwv0w/PSrx3aODV3ulYfPMhAV8qS5cyMXLIHcUwI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=QR5qe1oY; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="QR5qe1oY" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:From:Cc:To:Subject: MIME-Version:Date:Message-ID:From:Reply-To; bh=Fsmac5AfIS+2sdpxGtEa/zoQQktHluoPpZOiX4mnX7c=; b=QR5qe1oYOQiIMmUfD+UNy6x2Zn NiiJ5wL94eIa7xWc1dZdeD/JjDaGItJxuJpw68SKJza8XGhk+uCHa56b5LpGMuC2A2fu7ZO/A0at0 Hz9WMCJxkTRO6fLZ7SJfMAdTRpO8pdbc1YO0zotcHeuILSN9wj1hUKLrJu//RnZ9L7OZh2pV4+/Bo 2dvo5yD8JE69xYWictusWRG0xwFYV9/MTj5iQddGspzxu6TMRlDcIjlg9pANaEn1KWAHV6kG2ubsj VH6pDVGsH5Mq1jwPFu+ivV+u5qAtfaW54HmEF5A7jPxVsFw2CLWETI+BGu0ORxMTQkg9Y0Vofb4lm 1ZwwzzmA==; Received: from [179.118.190.213] (helo=[192.168.15.100]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1wquTj-00D1bd-QK; Mon, 03 Aug 2026 17:21:24 +0200 Message-ID: <85612f8f-0d22-4395-85cb-7987b0d5ade7@igalia.com> Date: Mon, 3 Aug 2026 12:21:23 -0300 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 RFC 9/9] futex: Use accessor for hrtimer_sleeper ->task field in requeue To: "Paul E. McKenney" Cc: "Peter Zijlstra (Intel)" , Thomas Gleixner , linux-kernel@vger.kernel.org, kernel-team@meta.com, Ingo Molnar , Anna-Maria Behnsen , Darren Hart , Davidlohr Bueso , Frederic Weisbecker References: <20260731004019.3530210-9-paulmck@kernel.org> Content-Language: en-US From: =?UTF-8?Q?Andr=C3=A9_Almeida?= In-Reply-To: <20260731004019.3530210-9-paulmck@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Em 30/07/2026 21:40, Paul E. McKenney escreveu: > 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 handle_early_requeue_pi_wakeup(). > > KCSAN located this issue. > > Signed-off-by: Paul E. McKenney > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Darren Hart > Cc: Davidlohr Bueso > Cc: "André Almeida" > Cc: Anna-Maria Behnsen > Cc: Frederic Weisbecker > Cc: Thomas Gleixner Reviewed-by: André Almeida