device: Use overflow helpers for devm_kmalloc()
authorKees Cook <keescook@chromium.org>
Wed, 9 May 2018 05:29:52 +0000 (22:29 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 5 Jun 2018 19:16:51 +0000 (12:16 -0700)
commit2509b561f7c6599907c08cb364c86b8c45466e4f
tree4d9002abaf08e2ebcda9d313a2d825aeb198d102
parent3b3b1a29eb89ba93f91213cbebb332a2ac31fa8b
device: Use overflow helpers for devm_kmalloc()

Use the overflow helpers both in existing multiplication-using inlines as
well as the addition-overflow case in the core allocation routine.

Signed-off-by: Kees Cook <keescook@chromium.org>
drivers/base/devres.c
include/linux/device.h