linux/drivers/net/bonding
Johannes Berg d9f0109091 net: bonding: correctly annotate RCU in bond_should_notify_peers()
[ Upstream commit 3ba359c0cd ]

RCU use in bond_should_notify_peers() looks wrong, since it does
rcu_dereference(), leaves the critical section, and uses the
pointer after that.

Luckily, it's called either inside a nested RCU critical section
or with the RTNL held.

Annotate it with rcu_dereference_rtnl() instead, and remove the
inner RCU critical section.

Fixes: 4cb4f97b7e ("bonding: rebuild the lock use for bond_mii_monitor()")
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Jay Vosburgh <jv@jvosburgh.net>
Link: https://patch.msgid.link/20240719094119.35c62455087d.I68eb9c0f02545b364b79a59f2110f2cf5682a8e2@changeid
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-08-03 08:54:37 +02:00
..
bond_3ad.c drivers/net/bonding/bond_3ad: return when there's no aggregator 2023-01-03 09:17:12 +00:00
bond_alb.c bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk 2024-02-05 20:14:19 +00:00
bond_debugfs.c bonding: remove redundant NULL check in debugfs function 2023-08-11 11:10:55 +01:00
bond_main.c net: bonding: correctly annotate RCU in bond_should_notify_peers() 2024-08-03 08:54:37 +02:00
bond_netlink.c bonding: fix send_peer_notif overflow 2023-05-10 09:27:20 +01:00
bond_options.c bonding: Fix out-of-bounds read in bond_option_arp_ip_targets_set() 2024-07-11 12:49:13 +02:00
bond_procfs.c bonding: show NS IPv6 targets in proc master info 2022-05-31 10:50:02 +02:00
bond_sysfs.c bonding: add modifier to initialization function and exit function 2023-08-11 11:10:55 +01:00
bond_sysfs_slave.c net: bonding: Convert to use sysfs_emit()/sysfs_emit_at() APIs 2022-09-30 12:29:45 +01:00
bonding_priv.h net: bonding: Add SPDX identifier to remaining files 2023-05-16 15:38:06 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00