diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2024-10-14 23:18:18 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-10-16 04:52:25 +0300 |
commit | 09aec57d8379f14ffde566621b920d97cc0c46e1 (patch) | |
tree | 8ee16b091f629a94709279b09bf2254710114306 /tools/perf/scripts/python | |
parent | df24129567f8458de3c0c7e08f9f0f1563f5dc75 (diff) | |
download | linux-09aec57d8379f14ffde566621b920d97cc0c46e1.tar.xz |
rtnetlink: Panic when __rtnl_register_many() fails for builtin callers.
We will replace all rtnl_register() and rtnl_register_module() with
rtnl_register_many().
Currently, rtnl_register() returns nothing and prints an error message
when it fails to register a rtnetlink message type and handlers.
The failure happens only when rtnl_register_internal() fails to allocate
rtnl_msg_handlers[protocol][msgtype], but it's unlikely for built-in
callers on boot time.
rtnl_register_many() unwinds the previous successful registrations on
failure and returns an error, but it will be useless for built-in callers,
especially some subsystems that do not have the legacy ioctl() interface
and do not work without rtnetlink.
Instead of booting up without rtnetlink functionality, let's panic on
failure for built-in rtnl_register_many() callers.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241014201828.91221-2-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions