lkml.org 
[lkml]   [2019]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH 2/2] ARM: futex: make futex_detect_cmpxchg more reliable
On Mon, Mar 11, 2019 at 3:36 PM Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
> On Mon, 11 Mar 2019 at 15:34, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Fri, Mar 8, 2019 at 12:56 PM Ard Biesheuvel
> > <ard.biesheuvel@linaro.org> wrote:
> > > On Fri, 8 Mar 2019 at 11:58, Russell King - ARM Linux admin <linux@armlinux.org.uk> wrote:
> > > > On Fri, Mar 08, 2019 at 11:45:21AM +0100, Ard Biesheuvel wrote:
> >
> > My first attempt (before finding the original patch from Mikael Pettersson)
> > was to change the probe to pass '1' as the value instead of '0', that
> > worked fine.
> >
>
> Which probe is that?

diff --git a/kernel/futex.c b/kernel/futex.c
index c3b73b0311bc..19615ad3c4f7 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -3864,7 +3864,7 @@ static void __init futex_detect_cmpxchg(void)
* implementation, the non-functional ones will return
* -ENOSYS.
*/
- if (cmpxchg_futex_value_locked(&curval, NULL, 0, 0) == -EFAULT)
+ if (cmpxchg_futex_value_locked(&curval, NULL, 1, 1) == -EFAULT)
futex_cmpxchg_enabled = 1;
#endif
}
Arnd

\
 
 \ /
  Last update: 2019-03-11 17:30    [W:0.158 / U:2.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site