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

Since introduced, br_vlan_rtnl_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: 8dcea187088b ("net: bridge: vlan: add rtm definitions and dump support")
Fixes: f26b296585dc ("net: bridge: vlan: add new rtm message support")
Fixes: adb3ce9bcb0f ("net: bridge: vlan: add del rtm message support")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/bridge/br_netlink.c
net/bridge/br_private.h
net/bridge/br_vlan.c