]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.18.127/new-helper-uaccess_kernel.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.18.127 / new-helper-uaccess_kernel.patch
1 From db68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63 Mon Sep 17 00:00:00 2001
2 From: Al Viro <viro@zeniv.linux.org.uk>
3 Date: Mon, 20 Mar 2017 21:08:07 -0400
4 Subject: new helper: uaccess_kernel()
5
6 From: Al Viro <viro@zeniv.linux.org.uk>
7
8 commit db68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63 upstream.
9
10 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 [only take the include/linux/uaccess.h portion - gregkh]
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13
14 ---
15 include/linux/uaccess.h | 3 +++
16 1 file changed, 3 insertions(+)
17
18 --- a/include/linux/uaccess.h
19 +++ b/include/linux/uaccess.h
20 @@ -2,6 +2,9 @@
21 #define __LINUX_UACCESS_H__
22
23 #include <linux/preempt.h>
24 +
25 +#define uaccess_kernel() segment_eq(get_fs(), KERNEL_DS)
26 +
27 #include <asm/uaccess.h>
28
29 /*