Skip to content

Commit d3a5a68

Browse files
danglin44hdeller
authored andcommitted
parisc: Fix mask used to select futex spinlock
The address bits used to select the futex spinlock need to match those used in the LWS code in syscall.S. The mask 0x3f8 only selects 7 bits. It should select 8 bits. This change fixes the glibc nptl/tst-cond24 and nptl/tst-cond25 tests. Signed-off-by: John David Anglin <dave.anglin@bell.net> Fixes: 53a42b6 ("parisc: Switch to more fine grained lws locks") Cc: stable@vger.kernel.org # 5.10+ Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 8f66fce commit d3a5a68

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/parisc/include/asm/futex.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ static inline void
1414
_futex_spin_lock(u32 __user *uaddr)
1515
{
1616
extern u32 lws_lock_start[];
17-
long index = ((long)uaddr & 0x3f8) >> 1;
17+
long index = ((long)uaddr & 0x7f8) >> 1;
1818
arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index];
1919
preempt_disable();
2020
arch_spin_lock(s);
@@ -24,7 +24,7 @@ static inline void
2424
_futex_spin_unlock(u32 __user *uaddr)
2525
{
2626
extern u32 lws_lock_start[];
27-
long index = ((long)uaddr & 0x3f8) >> 1;
27+
long index = ((long)uaddr & 0x7f8) >> 1;
2828
arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index];
2929
arch_spin_unlock(s);
3030
preempt_enable();

0 commit comments

Comments
 (0)