All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thread_info.h: include limits.h for INT_MAX
@ 2021-05-13  5:03 Randy Dunlap
  0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2021-05-13  5:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: Randy Dunlap, Kees Cook, Andrew Morton

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 <rdunlap@infradead.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 include/linux/thread_info.h |    1 +
 1 file changed, 1 insertion(+)

--- mmotm-2021-0512-2146.orig/include/linux/thread_info.h
+++ mmotm-2021-0512-2146/include/linux/thread_info.h
@@ -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>
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-13  5:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13  5:03 [PATCH] thread_info.h: include limits.h for INT_MAX Randy Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.