[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250314104259.GA36322@noisy.programming.kicks-ass.net>
Date: Fri, 14 Mar 2025 11:42:59 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org,
André Almeida <andrealmeid@...lia.com>,
Darren Hart <dvhart@...radead.org>,
Davidlohr Bueso <dave@...olabs.net>, Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Valentin Schneider <vschneid@...hat.com>,
Waiman Long <longman@...hat.com>
Subject: Re: [PATCH v10 00/21] futex: Add support task local hash maps,
FUTEX2_NUMA and FUTEX2_MPOL
On Wed, Mar 12, 2025 at 04:18:48PM +0100, Sebastian Andrzej Siewior wrote:
> @@ -196,12 +196,12 @@ static bool __futex_pivot_hash(struct mm_struct *mm,
> {
> struct futex_private_hash *fph;
>
> - lockdep_assert_held(&mm->futex_hash_lock);
> WARN_ON_ONCE(mm->futex_phash_new);
>
> - fph = mm->futex_phash;
> + fph = rcu_dereference_protected(mm->futex_phash,
> + lockdep_is_held(&mm->futex_hash_lock));
I are confused... this makes no sense. Why ?!
We only ever write that variable while holding this lock, we hold the
lock, we don't need RCU to read the variable.
Powered by blists - more mailing lists