projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1525e06
)
m68k: Make sys_atomic_cmpxchg_32 work on classic m68k
author
Andreas Schwab
<
[email protected]
>
Fri, 27 Jul 2012 22:20:34 +0000
(
00:20
+0200)
committer
Geert Uytterhoeven
<
[email protected]
>
Thu, 2 Aug 2012 22:48:24 +0000
(
00:48
+0200)
User space access must always go through uaccess accessors, since on
classic m68k user space and kernel space are completely separate.
Signed-off-by: Andreas Schwab <
[email protected]
>
Tested-by: Thorsten Glaser <
[email protected]
>
Signed-off-by: Geert Uytterhoeven <
[email protected]
>
Cc:
[email protected]
arch/m68k/kernel/sys_m68k.c
patch
|
blob
|
history
diff --git
a/arch/m68k/kernel/sys_m68k.c
b/arch/m68k/kernel/sys_m68k.c
index 8623f8dc16f8a03c9da88910537ae93fc47bc510..9a5932ec368946bf808c5faf527cbf39731b5540 100644
(file)
--- 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,
goto bad_access;
}
- mem_value = *mem;
+ /*
+ * No need to check for EFAULT; we know that the page is
+ * present and writable.
+ */
+ __get_user(mem_value, mem);
if (mem_value == oldval)
-
*mem = newval
;
+
__put_user(newval, mem)
;
pte_unmap_unlock(pte, ptl);
up_read(&mm->mmap_sem);