summaryrefslogtreecommitdiffstats
path: root/arch/unicore32
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-03-20 21:08:07 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-03-28 16:43:25 -0400
commitdb68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63 (patch)
tree77eda1d247853a2d414e0047c620b3c72bb11a1a /arch/unicore32
parentaaa2e7ac80f679230faf28a8e12e8d68dbe977eb (diff)
downloadlinux-db68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63.tar.gz
linux-db68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63.tar.bz2
linux-db68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63.zip
new helper: uaccess_kernel()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/unicore32')
-rw-r--r--arch/unicore32/include/asm/uaccess.h2
-rw-r--r--arch/unicore32/kernel/process.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/unicore32/include/asm/uaccess.h b/arch/unicore32/include/asm/uaccess.h
index f60fab718b59..1196c88c2f9b 100644
--- a/arch/unicore32/include/asm/uaccess.h
+++ b/arch/unicore32/include/asm/uaccess.h
@@ -20,7 +20,7 @@
#define __strnlen_user __strnlen_user
#define __clear_user __clear_user
-#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
+#define __kernel_ok (uaccess_kernel())
#define __user_ok(addr, size) (((size) <= TASK_SIZE) \
&& ((addr) <= TASK_SIZE - (size)))
#define __access_ok(addr, size) (__kernel_ok || __user_ok((addr), (size)))
diff --git a/arch/unicore32/kernel/process.c b/arch/unicore32/kernel/process.c
index d22c1dc7e39e..ddaf78ae6854 100644
--- a/arch/unicore32/kernel/process.c
+++ b/arch/unicore32/kernel/process.c
@@ -178,7 +178,7 @@ void __show_regs(struct pt_regs *regs)
buf, interrupts_enabled(regs) ? "n" : "ff",
fast_interrupts_enabled(regs) ? "n" : "ff",
processor_modes[processor_mode(regs)],
- segment_eq(get_fs(), get_ds()) ? "kernel" : "user");
+ uaccess_kernel() ? "kernel" : "user");
{
unsigned int ctrl;