linux-IllusionX/net/core
Kuniyuki Iwashima d5d0401079 rtnetlink: Add bulk registration helpers for rtnetlink message handlers.
[ Upstream commit 07cc7b0b942bf55ef1a471470ecda8d2a6a6541f ]

Before commit addf9b90de ("net: rtnetlink: use rcu to free rtnl message
handlers"), once rtnl_msg_handlers[protocol] was allocated, the following
rtnl_register_module() for the same protocol never failed.

However, after the commit, rtnl_msg_handler[protocol][msgtype] needs to
be allocated in each rtnl_register_module(), so each call could fail.

Many callers of rtnl_register_module() do not handle the returned error,
and we need to add many error handlings.

To handle that easily, let's add wrapper functions for bulk registration
of rtnetlink message handlers.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Stable-dep-of: 78b7b991838a ("vxlan: Handle error of rtnl_register_module().")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:26:51 +02:00
..
bpf_sk_storage.c
datagram.c
dev.c
dev.h
dev_addr_lists.c
dev_addr_lists_test.c
dev_ioctl.c
drop_monitor.c
dst.c
dst_cache.c
failover.c
fib_notifier.c
fib_rules.c
filter.c
flow_dissector.c
flow_offload.c
gen_estimator.c
gen_stats.c
gro.c
gro_cells.c
gso.c
hotdata.c
hwbm.c
ieee8021q_helpers.c
link_watch.c
lwt_bpf.c
lwtunnel.c
Makefile
neighbour.c
net-procfs.c
net-sysfs.c
net-sysfs.h
net-traces.c
net_namespace.c
net_test.c
netclassid_cgroup.c
netdev-genl-gen.c
netdev-genl-gen.h
netdev-genl.c
netevent.c
netpoll.c
netprio_cgroup.c
of_net.c
page_pool.c
page_pool_priv.h
page_pool_user.c
pktgen.c
ptp_classifier.c
request_sock.c
rtnetlink.c
scm.c
secure_seq.c
selftests.c
skbuff.c
skmsg.c
sock.c
sock_destructor.h
sock_diag.c
sock_map.c
sock_reuseport.c
stream.c
sysctl_net_core.c
timestamping.c
tso.c
utils.c
xdp.c