]> www.infradead.org Git - users/hch/dma-mapping.git/commit
mpls: Handle error of rtnl_register_module().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 8 Oct 2024 18:47:36 +0000 (11:47 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 10 Oct 2024 13:39:35 +0000 (15:39 +0200)
commit5be2062e3080e3ff6707816caa445ec0c6eaacf7
tree879ba5e14150362810f9a2c8b9f5de5883f6b5c8
parentd51705614f668254cc5def7490df76f9680b4659
mpls: Handle error of rtnl_register_module().

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: 03c0566542f4 ("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>
net/mpls/af_mpls.c