arm64: dts: rockchip: rk3368-p9: add ramp-delay for syr82x dcdc
[firefly-linux-kernel-4.4.55.git] / mm / usercopy.c
index c56b97b7c49ccf579784d65cccd7908310d64c38..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>
 
@@ -124,7 +125,7 @@ static inline const char *check_kernel_text_object(const void *ptr,
 static inline const char *check_bogus_address(const void *ptr, unsigned long n)
 {
        /* Reject if object wraps past end of memory. */
-       if (ptr + n < ptr)
+       if ((unsigned long)ptr + n < (unsigned long)ptr)
                return "<wrapped address>";
 
        /* Reject if NULL or ZERO-allocation. */