summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-03-20 21:08:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-27 16:05:38 +0100
commit9265b0aba03d6754ddcd6ea8aced431be0380626 (patch)
tree022d267101b7788f0240aa4c43dbd8c2b9f0d49d /include
parent4c235447701f24884b55f38d771ca2ae643a135f (diff)
downloadlinux-stable-9265b0aba03d6754ddcd6ea8aced431be0380626.tar.gz
linux-stable-9265b0aba03d6754ddcd6ea8aced431be0380626.tar.bz2
linux-stable-9265b0aba03d6754ddcd6ea8aced431be0380626.zip
new helper: uaccess_kernel()
commit db68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63 upstream. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> [only take the include/linux/uaccess.h portion - gregkh] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/uaccess.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index ecd3319dac33..ee7e1b8afd3a 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -2,6 +2,9 @@
#define __LINUX_UACCESS_H__
#include <linux/preempt.h>
+
+#define uaccess_kernel() segment_eq(get_fs(), KERNEL_DS)
+
#include <asm/uaccess.h>
/*