]> git.baikalelectronics.ru Git - kernel.git/commit
mm: Use overflow helpers in kvmalloc()
authorKees Cook <keescook@chromium.org>
Tue, 8 May 2018 19:55:26 +0000 (12:55 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 5 Jun 2018 19:16:51 +0000 (12:16 -0700)
commit3402b7d9e86c2462fa87a456eb1a1712deb0029b
treef163f64ea43d4afee78f1bc0ad5eadc882e40343
parent9a42adf6ab9f9bd36e863b230b81cbdbcc6118df
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>
include/linux/mm.h
include/linux/vmalloc.h