openvswitch: Use kmalloc_size_roundup() to match ksize() usage
authorKees Cook <keescook@chromium.org>
Tue, 18 Oct 2022 09:06:33 +0000 (02:06 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Oct 2022 00:05:52 +0000 (17:05 -0700)
commitab3f7828c9793a5dfa99a54dc19ae3491c38bfa3
tree7d82cf2cf2f0c4a597d867b190d04120cecbae85
parent5c624a1d77d3eb2e314b59282b1213fa760d192c
openvswitch: Use kmalloc_size_roundup() to match ksize() usage

Round up allocations with kmalloc_size_roundup() so that openvswitch's
use of ksize() is always accurate and no special handling of the memory
is needed by KASAN, UBSAN_BOUNDS, nor FORTIFY_SOURCE.

Cc: Pravin B Shelar <pshelar@ovn.org>
Cc: dev@openvswitch.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20221018090628.never.537-kees@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/openvswitch/flow_netlink.c