linux-IllusionX/net/mpls
Kuniyuki Iwashima d29cddd5c7 mpls: Handle error of rtnl_register_module().
[ Upstream commit 5be2062e3080e3ff6707816caa445ec0c6eaacf7 ]

Since introduced, mpls_init() 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: 03c0566542 ("mpls: Netlink commands to add, remove, and dump routes")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:26:52 +02:00
..
af_mpls.c
internal.h
Kconfig
Makefile
mpls_gso.c
mpls_iptunnel.c