]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: split up copies in the ack construction
authorJakub Kicinski <kuba@kernel.org>
Thu, 27 Oct 2022 21:25:53 +0000 (14:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Oct 2023 20:00:44 +0000 (22:00 +0200)
commit1a6e2da05f379dd465a6be40ee44567824d2b292
treed6d4eeb521b2b8caa276858f349b5263cfda90e8
parent220f0f866d694b7765e03a70d4457ccd0c1bbe7c
netlink: split up copies in the ack construction

[ Upstream commit 738136a0e3757a8534df3ad97d6ff6d7f429f6c1 ]

Clean up the use of unsafe_memcpy() by adding a flexible array
at the end of netlink message header and splitting up the header
and data copies.

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: d0f95894fda7 ("netlink: annotate data-races around sk->sk_err")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/netlink.h
include/uapi/linux/netlink.h
net/netlink/af_netlink.c