Home Home > GIT Browse
summaryrefslogtreecommitdiff
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:08:02 +0100
commit342bd595ed72437f76df9177b66a90e40d5119fd (patch)
tree23a089d34f8c1248bd65cc2ee07c8e782a00c926
parent7f0052a880242f9bc769b4fe676c1693fc36094e (diff)
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>
-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 558129af828a..15c7b5420d8a 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -2,6 +2,9 @@
#define __LINUX_UACCESS_H__
#include <linux/sched.h>
+
+#define uaccess_kernel() segment_eq(get_fs(), KERNEL_DS)
+
#include <asm/uaccess.h>
static __always_inline void pagefault_disabled_inc(void)