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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:59 +0000 (13:32 +0100)
commitbde272c8758dc379b65d05a05fc048b3ae98498e
tree443ba2ddb9225fe71ba8b2c402e57351368c3308
parent79a124b588aadb5a22695542778de14366ff3219
openvswitch: Use kmalloc_size_roundup() to match ksize() usage

[ Upstream commit ab3f7828c9793a5dfa99a54dc19ae3491c38bfa3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/openvswitch/flow_netlink.c