diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2024-10-08 21:47:37 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-10-10 16:39:36 +0300 |
commit | b5e837c86041bef60f36cf9f20a641a30764379a (patch) | |
tree | e4dce5ab51ea4be31ef0c8dc6687634bcb940197 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 5be2062e3080e3ff6707816caa445ec0c6eaacf7 (diff) | |
download | linux-b5e837c86041bef60f36cf9f20a641a30764379a.tar.xz |
phonet: Handle error of rtnl_register_module().
Before commit addf9b90de22 ("net: rtnetlink: use rcu to free rtnl
message handlers"), once the first rtnl_register_module() allocated
rtnl_msg_handlers[PF_PHONET], the following calls never failed.
However, after the commit, rtnl_register_module() could fail silently
to allocate rtnl_msg_handlers[PF_PHONET][msgtype] and requires error
handling for each call.
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 use rtnl_register_many() to handle the errors easily.
Fixes: addf9b90de22 ("net: rtnetlink: use rcu to free rtnl message handlers")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Rémi Denis-Courmont <courmisch@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions