Re: [PATCH v12 14/21] futex: Allow to resize the private local hash

From: André Almeida
Date: Fri May 16 2025 - 09:00:54 EST


Em 16/05/2025 07:49, Sebastian Andrzej Siewior escreveu:
On 2025-05-08 17:32:24 [-0300], André Almeida wrote:
+ if (!__futex_pivot_hash(mm, new) && custom)
+ goto again;

Is it safe to use a goto inside a scoped_guard(){}?

We jump outside of the scoped_guard() and while testing I've been
looking at the assembly and gcc did the right thing. So I would say why
not. The alternative would be to do manual lock/unlock and think about
the unlock just before the goto statement so this looks "easier".


Ok, thanks for conforming it! I wasn't sure about the goto but now it's clear to me.