sst-linux/net/core
Breno Leitao 486033f577 netpoll: hold rcu read lock in __netpoll_send_skb()
[ Upstream commit 505ead7ab77f289f12d8a68ac83da068e4d4408b ]

The function __netpoll_send_skb() is being invoked without holding the
RCU read lock. This oversight triggers a warning message when
CONFIG_PROVE_RCU_LIST is enabled:

	net/core/netpoll.c:330 suspicious rcu_dereference_check() usage!

	 netpoll_send_skb
	 netpoll_send_udp
	 write_ext_msg
	 console_flush_all
	 console_unlock
	 vprintk_emit

To prevent npinfo from disappearing unexpectedly, ensure that
__netpoll_send_skb() is protected with the RCU read lock.

Fixes: 2899656b49 ("netpoll: take rcu_read_lock_bh() in netpoll_send_skb_on_dev()")
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250306-netpoll_rcu_v2-v2-1-bc4f5c51742a@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-28 21:58:49 +01:00
..
bpf_sk_storage.c
datagram.c
dev_addr_lists_test.c
dev_addr_lists.c
dev_ioctl.c
dev.c net: Add non-RCU dev_getbyhwaddr() helper 2025-03-07 16:56:36 +01:00
dev.h
drop_monitor.c drop_monitor: fix incorrect initialization order 2025-03-07 16:56:38 +01:00
dst_cache.c
dst.c net: do not delay dst_entries_add() in dst_release() 2024-11-14 13:15:17 +01:00
failover.c
fib_notifier.c
fib_rules.c
filter.c bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write 2025-02-21 13:49:09 +01:00
flow_dissector.c flow_dissector: Fix port range key handling in BPF conversion 2025-03-07 16:56:35 +01:00
flow_offload.c
gen_estimator.c net: use unrcu_pointer() helper 2024-12-14 19:53:33 +01:00
gen_stats.c
gro_cells.c
gro.c net: Clear old fragment checksum value in napi_reuse_skb 2025-03-07 16:56:45 +01:00
hwbm.c
link_watch.c
lwt_bpf.c
lwtunnel.c
Makefile
neighbour.c neighbour: use RCU protection in __neigh_notify() 2025-02-21 13:50:08 +01:00
net_namespace.c net: add exit_batch_rtnl() method 2025-01-23 17:17:09 +01:00
net-procfs.c
net-sysfs.c
net-sysfs.h
net-traces.c
netclassid_cgroup.c
netevent.c
netpoll.c netpoll: hold rcu read lock in __netpoll_send_skb() 2025-03-28 21:58:49 +01:00
netprio_cgroup.c
of_net.c
page_pool.c
pktgen.c pktgen: Avoid out-of-bounds access in get_imix_entries 2025-01-23 17:17:09 +01:00
ptp_classifier.c
request_sock.c
rtnetlink.c net: fix crash when config small gso_max_size/gso_ipv4_max_size 2024-12-14 19:53:11 +01:00
scm.c
secure_seq.c
selftests.c
skbuff.c ipvs: Always clear ipvs_property flag in skb_scrub_packet() 2025-03-07 16:56:45 +01:00
skmsg.c bpf: Fix wrong copied_seq calculation 2025-03-07 16:56:37 +01:00
sock_destructor.h
sock_diag.c net: use unrcu_pointer() helper 2024-12-14 19:53:33 +01:00
sock_map.c bpf, sockmap: Fix race between element replace and close() 2025-01-17 13:34:36 +01:00
sock_reuseport.c
sock.c net: restrict SO_REUSEPORT to inet sockets 2025-01-09 13:30:02 +01:00
stream.c
sysctl_net_core.c net: set the minimum for net_hotdata.netdev_budget_usecs 2025-03-07 16:56:43 +01:00
timestamping.c
tso.c
utils.c
xdp.c