diff options
Diffstat (limited to 'arch/m68k/kernel/sys_m68k.c')
-rw-r--r-- | arch/m68k/kernel/sys_m68k.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c index 8623f8dc16f8..9a5932ec3689 100644 --- a/arch/m68k/kernel/sys_m68k.c +++ b/arch/m68k/kernel/sys_m68k.c | |||
@@ -479,9 +479,13 @@ sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3, int d4, int d5, | |||
479 | goto bad_access; | 479 | goto bad_access; |
480 | } | 480 | } |
481 | 481 | ||
482 | mem_value = *mem; | 482 | /* |
483 | * No need to check for EFAULT; we know that the page is | ||
484 | * present and writable. | ||
485 | */ | ||
486 | __get_user(mem_value, mem); | ||
483 | if (mem_value == oldval) | 487 | if (mem_value == oldval) |
484 | *mem = newval; | 488 | __put_user(newval, mem); |
485 | 489 | ||
486 | pte_unmap_unlock(pte, ptl); | 490 | pte_unmap_unlock(pte, ptl); |
487 | up_read(&mm->mmap_sem); | 491 | up_read(&mm->mmap_sem); |