• Max Filippov's avatar
    xtensa: fix futex_atomic_cmpxchg_inatomic · ca474809
    Max Filippov authored
    Return 0 if the operation was successful, not the userspace memory
    value. Check that userspace value equals passed oldval, not itself.
    Don't update *uval if the value wasn't read from userspace memory.
    
    This fixes process hang due to infinite loop in futex_lock_pi.
    It also fixes a bunch of glibc tests nptl/tst-mutexpi*.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
    ca474809
futex.h 2.59 KB