Commit 1e0c1ac1 authored by Mark Charlebois's avatar Mark Charlebois Committed by Behan Webster
Browse files

arm64: LLVMLinux: Check for NULL in futext_atomic_cmpxchg_inatomic()



futex_init passes in uaddr = 0. The LLVM optimizer will see that *uaddr is 0, set the register
to xzr and compilation will fail.
Signed-off-by: default avatarMark Charlebois <charlebm@gmail.com>
parent 255d80ae
......@@ -108,7 +108,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
int ret = 0;
u32 val, tmp;
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))
if (uaddr == 0 || !access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))
return -EFAULT;
asm volatile("// futex_atomic_cmpxchg_inatomic\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment