This is a note to let you know that I've just added the patch titled
m68k: Make sys_atomic_cmpxchg_32 work on classic m68k
to the 3.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
m68k-make-sys_atomic_cmpxchg_32-work-on-classic-m68k.patch
and it can be found in the queue-3.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 9e2760d18b3cf179534bbc27692c84879c61b97c Mon Sep 17 00:00:00 2001
From: Andreas Schwab <[email protected]>
Date: Sat, 28 Jul 2012 00:20:34 +0200
Subject: m68k: Make sys_atomic_cmpxchg_32 work on classic m68k
From: Andreas Schwab <[email protected]>
commit 9e2760d18b3cf179534bbc27692c84879c61b97c upstream.
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]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
arch/m68k/kernel/sys_m68k.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -479,9 +479,13 @@ sys_atomic_cmpxchg_32(unsigned long newv
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);
Patches currently in stable-queue which might be from [email protected] are
queue-3.0/m68k-make-sys_atomic_cmpxchg_32-work-on-classic-m68k.patch
queue-3.0/powerpc-fix-wrong-divisor-in-usecs_to_cputime.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html