mm: Fix build for hardened usercopy
authorAmit Pundir <amit.pundir@linaro.org>
Wed, 12 Oct 2016 14:48:18 +0000 (20:18 +0530)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 12 Oct 2016 17:05:30 +0000 (22:35 +0530)
Include  missing linux/sched.h to fix following build failure for
ARCH=i386+allmodconfig build.

  CC      mm/usercopy.o
mm/usercopy.c: In function ‘check_stack_object’:
mm/usercopy.c:40:29: error: implicit declaration of function ‘task_stack_page’ [-Werror=implicit-function-declaration]
  const void * const stack = task_stack_page(current);
                             ^
scripts/Makefile.build:258: recipe for target 'mm/usercopy.o' failed

Fixes: 799abb4f9534 ("mm: Hardened usercopy")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
mm/usercopy.c

index 089328f2b9209ea3526c6caed032b95adad85d0b..b34996a3860b0bad6676f26eeb38a7469cc63de4 100644 (file)
@@ -15,6 +15,7 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/mm.h>
+#include <linux/sched.h>
 #include <linux/slab.h>
 #include <asm/sections.h>