OpenCloudOS-Kernel/net/mctp
Kuniyuki Iwashima f4df31a051 mctp: Handle error of rtnl_register_module().
[ Upstream commit d51705614f668254cc5def7490df76f9680b4659 ]

Since introduced, mctp has been ignoring the returned value of
rtnl_register_module(), which could fail silently.

Handling the error allows users to view a module as an all-or-nothing
thing in terms of the rtnetlink functionality.  This prevents syzkaller
from reporting spurious errors from its tests, where OOM often occurs
and module is automatically loaded.

Let's handle the errors by rtnl_register_many().

Fixes: 583be982d9 ("mctp: Add device handling and netlink interface")
Fixes: 831119f887 ("mctp: Add neighbour netlink interface")
Fixes: 06d2f4c583 ("mctp: Add netlink route management")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:24:29 +02:00
..
test net: mctp: test: Use correct skb for route input check 2024-08-29 17:33:46 +02:00
Kconfig mctp: Add flow extension to skb 2021-10-29 13:23:51 +01:00
Makefile mctp: Add test utils 2021-10-03 14:35:41 +01:00
af_mctp.c mctp: Handle error of rtnl_register_module(). 2024-10-17 15:24:29 +02:00
device.c mctp: Handle error of rtnl_register_module(). 2024-10-17 15:24:29 +02:00
neigh.c mctp: Handle error of rtnl_register_module(). 2024-10-17 15:24:29 +02:00
route.c mctp: Handle error of rtnl_register_module(). 2024-10-17 15:24:29 +02:00