aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/vmalloc.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2018-05-08 15:55:26 -0400
committerKees Cook <keescook@chromium.org>2018-06-05 15:16:51 -0400
commit3b3b1a29eb89ba93f91213cbebb332a2ac31fa8b (patch)
treef163f64ea43d4afee78f1bc0ad5eadc882e40343 /include/linux/vmalloc.h
parent49b7f8983aa78581bfd511a26891b26cd734e293 (diff)
mm: Use overflow helpers in kvmalloc()
Instead of open-coded multiplication and bounds checking, use the new overflow helper. Additionally prepare for vmalloc() users to add array_size()-family helpers in the future. Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'include/linux/vmalloc.h')
-rw-r--r--include/linux/vmalloc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 1e5d8c392f15..398e9c95cd61 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -8,6 +8,7 @@
8#include <linux/llist.h> 8#include <linux/llist.h>
9#include <asm/page.h> /* pgprot_t */ 9#include <asm/page.h> /* pgprot_t */
10#include <linux/rbtree.h> 10#include <linux/rbtree.h>
11#include <linux/overflow.h>
11 12
12struct vm_area_struct; /* vma defining user mapping in mm_types.h */ 13struct vm_area_struct; /* vma defining user mapping in mm_types.h */
13struct notifier_block; /* in notifier.h */ 14struct notifier_block; /* in notifier.h */