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>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <linux/llist.h>
|
||||
#include <asm/page.h> /* pgprot_t */
|
||||
#include <linux/rbtree.h>
|
||||
#include <linux/overflow.h>
|
||||
|
||||
struct vm_area_struct; /* vma defining user mapping in mm_types.h */
|
||||
struct notifier_block; /* in notifier.h */
|
||||
|
Reference in New Issue
Block a user