[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ttpowajb.fsf@oldenburg.str.redhat.com>
Date: Tue, 14 Nov 2023 17:43:20 +0100
From: Florian Weimer <fweimer@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Xi Ruoyao <xry111@...111.site>, libc-alpha@...rceware.org,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
linux-mm@...ck.org, linux-arch@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
André Almeida <andrealmeid@...lia.com>
Subject: Re: Several tst-robust* tests time out with recent Linux kernel
* Peter Zijlstra:
>> diff --git a/kernel/futex/futex.h b/kernel/futex/futex.h
>> index b5379c0e6d6d..1a1f9301251f 100644
>> --- a/kernel/futex/futex.h
>> +++ b/kernel/futex/futex.h
>> @@ -17,7 +17,7 @@
>> * restarts.
>> */
>> #ifdef CONFIG_MMU
>> -# define FLAGS_SHARED 0x01
>> +# define FLAGS_SHARED 0x10
>> #else
>> /*
>> * NOMMU does not have per process address space. Let the compiler optimize
>
> Just the above seems sufficient.
There are a few futex_wake calls which hard-code the flags argument as
1:
kernel/futex/core.c=637=static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,
--
kernel/futex/core.c-686- * this.
kernel/futex/core.c-687- */
kernel/futex/core.c-688- owner = uval & FUTEX_TID_MASK;
kernel/futex/core.c-689-
kernel/futex/core.c-690- if (pending_op && !pi && !owner) {
kernel/futex/core.c:691: futex_wake(uaddr, 1, 1, FUTEX_BITSET_MATCH_ANY);
kernel/futex/core.c-692- return 0;
kernel/futex/core.c-693- }
kernel/futex/core.c-694-
kernel/futex/core.c-695- if (owner != task_pid_vnr(curr))
kernel/futex/core.c-696- return 0;
--
kernel/futex/core.c-739- /*
kernel/futex/core.c-740- * Wake robust non-PI futexes here. The wakeup of
kernel/futex/core.c-741- * PI futexes happens in exit_pi_state():
kernel/futex/core.c-742- */
kernel/futex/core.c-743- if (!pi && (uval & FUTEX_WAITERS))
kernel/futex/core.c:744: futex_wake(uaddr, 1, 1, FUTEX_BITSET_MATCH_ANY);
kernel/futex/core.c-745-
kernel/futex/core.c-746- return 0;
kernel/futex/core.c-747-}
kernel/futex/core.c-748-
kernel/futex/core.c-749-/*
Thanks,
Florian
Powered by blists - more mailing lists