diff options
| author | Hangbin Liu <liuhangbin@gmail.com> | 2025-09-05 09:15:32 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-19 16:37:38 +0200 |
| commit | 43242aed9060bbcecf53bd2f5f8251d24e5f1c7f (patch) | |
| tree | 51a98001d7c08f9a33ca5c5a468fa58856e86a2a /include/net/aligned_data.h | |
| parent | 4fb6bcc1e68f6b2e050bb76c49a9b4800ff5f973 (diff) | |
hsr: use hsr_for_each_port_rtnl in hsr_port_get_hsr
[ Upstream commit 393c841fe4333cdd856d0ca37b066d72746cfaa6 ]
hsr_port_get_hsr() iterates over ports using hsr_for_each_port(),
but many of its callers do not hold the required RCU lock.
Switch to hsr_for_each_port_rtnl(), since most callers already hold
the rtnl lock. After review, all callers are covered by either the rtnl
lock or the RCU lock, except hsr_dev_xmit(). Fix this by adding an
RCU read lock there.
Fixes: c5a759117210 ("net/hsr: Use list_head (and rcu) instead of array for slave devices.")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250905091533.377443-3-liuhangbin@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions
