thread_info.h: include limits.h for INT_MAX
PATCH 1/1 thread_info.h: include limits.h for INT_MAX
Add header file <linux/limits.h> to make thread_info.h be self-contained.
Fixes multiple occurrences of this error:
../include/linux/thread_info.h: In function ‘check_copy_size’:../include/linux/thread_info.h:215:27: error: ‘INT_MAX’ undeclared (first use in this function)
if (WARN_ON_ONCE(bytes > INT_MAX))
^
Fixes 6d13de1489b6 ("uaccess: disallow > INT_MAX copy sizes")
Signed-off-by Randy Dunlap <[email protected]>
Cc Kees Cook <[email protected]>
Cc Andrew Morton <[email protected]>
--- include/linux/thread_info.h | 1 + 1 file changed, 1 insertion(+)
include/linux/thread_info.h +1 -0
@@ -10,6 +10,7 @@#include <linux/types.h> #include <linux/bug.h> +#include <linux/limits.h> #include <linux/restart_block.h> #include <linux/errno.h>