Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2048556 authored by Johannes Berg's avatar Johannes Berg Committed by Vegard Nossum
Browse files

net: bonding: correctly annotate RCU in bond_should_notify_peers()



[ Upstream commit 3ba359c0cd6eb5ea772125a7aededb4a2d516684 ]

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: 4cb4f97b ("bonding: rebuild the lock use for bond_mii_monitor()")
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Acked-by: default avatarJay Vosburgh <jv@jvosburgh.net>
Link: https://patch.msgid.link/20240719094119.35c62455087d.I68eb9c0f02545b364b79a59f2110f2cf5682a8e2@changeid


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
(cherry picked from commit 6c9261a2bdf614b376dbefa01e0c6bb32d14e019)
Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
parent ef5a6f1d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment