[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241206081901.cPNVptQi@linutronix.de>
Date: Fri, 6 Dec 2024 09:19:01 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: linux-kernel@...r.kernel.org
Cc: 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>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Valentin Schneider <vschneid@...hat.com>,
Waiman Long <longman@...hat.com>,
Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: [PATCH v4 07/11] futex: Allow to make the number of slots
invariant.
On 2024-12-03 17:42:15 [+0100], To linux-kernel@...r.kernel.org wrote:
> diff --git a/kernel/futex/core.c b/kernel/futex/core.c
> index 0dd7100e36419..1abea8f9abd22 100644
> --- a/kernel/futex/core.c
> +++ b/kernel/futex/core.c
> @@ -1323,6 +1335,36 @@ static int futex_hash_get_slots(void)
…
> +bool futex_hash_is_invariant(void)
> +{
> + struct futex_hash_bucket_private *hb_p;
> + struct mm_struct *mm;
> +
> + mm = current->mm;
> + guard(rcu)();
> + hb_p = rcu_dereference(mm->futex_hash_bucket);
> + if (!hb_p)
> + return -EINVAL;
Dan spotted that this should be false.
> + return hb_p->slots_invariant;
> +}
Sebastian
Powered by blists - more mailing lists