OpenCloudOS-Kernel/net/mpls
Kuniyuki Iwashima 4597c3866d 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:24:30 +02:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
af_mpls.c mpls: Handle error of rtnl_register_module(). 2024-10-17 15:24:30 +02:00
internal.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-02 11:44:56 -08:00
mpls_gso.c net: mpls: error out if inner headers are not set 2024-04-13 13:07:41 +02:00
mpls_iptunnel.c mpls: load mpls_gso after mpls_iptunnel 2020-10-20 21:16:45 -07:00