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 4369E313545 for ; Mon, 3 Aug 2026 15:21:07 +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=1785770471; cv=none; b=uNrIcCiL/HtHMlUgbE1OSmIzEMjo0hMM8XdzlrvrDQFBcBZIZRJT7ph6mpEsyUIEY97VTsCoyDnCwmqkmdeOWYH2qEoBd+f1ztCZhQjo1JE0c76PG/CCp3Mxc12p10s7FHv04qVGsx5mibFJPeDDu7YCgUwtAP5YCOoufo/z0vg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785770471; c=relaxed/simple; bh=0RPYmE2ctMr8mMmy80sgk+MhMhWcUujy/JKpezoXH1w=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LDXh8AiqvjQ8ZDBeRcr0gNpVX4/0en3fK3XMkwd4AwpjmoGc60N2MPfK4UZqtdeMiqKIEv+NWcq7QmqF6qbmtwGt7qjigcNeWQmg0eqnbq/dsXwLxQO4rkjTAFpCpUIhUh2gIqkOKgw5RYirEw6/lkgn3bs1oOXO/P5tspJ+kv8= 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=LOgHOPKY; 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="LOgHOPKY" 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=rgkGkIbegBZysX7XD0ehjSPFiyEFbQ24i4LGRQFWBko=; b=LOgHOPKYmfTWKQNZ1acY98NifG /Qes+uZ+FU7jqxR6kkTnNsC9lzteUgUDOm8YG1mSaZk5teV4L/5hjtB9CeztEKIzVr5o4b3VSSxIj KT3Br8OOHfK7zm1Zdx7ZBiZ5T89i34fyEgnwuMNP6uPitoVSCQkzEfZJMJD72cFNpgeemabO0f4FB ngLYiLPV4KV/nGouj17euaDOvbuGCLjx39+6EHv6KdLcRvGlP6hrkJHM3bzQ+jxrVX1/xfP9+4OIV Kprve0D7RHboPxJ52gxbO2mDwAuF0JXMO7kIWv9MG873T/l7+XEBE+UCWHSkd/UrN+KXrta8Ak0GD 65eFXUzA==; 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 1wquTK-00D1af-5M; Mon, 03 Aug 2026 17:20:58 +0200 Message-ID: <09bb77a4-7aff-4a97-925a-4030a63efea8@igalia.com> Date: Mon, 3 Aug 2026 12:20:55 -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 5/9] futex: Use accessor for hrtimer_sleeper ->task field in waitwake.c To: "Paul E. McKenney" Cc: "Peter Zijlstra (Intel)" , Anna-Maria Behnsen , linux-kernel@vger.kernel.org, Thomas Gleixner , Frederic Weisbecker , kernel-team@meta.com, Ingo Molnar , Darren Hart , Davidlohr Bueso References: <20260731004019.3530210-5-paulmck@kernel.org> Content-Language: en-US From: =?UTF-8?Q?Andr=C3=A9_Almeida?= In-Reply-To: <20260731004019.3530210-5-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 kernel/futex/waitwake.c. > > 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