summaryrefslogtreecommitdiff
path: root/include/net/aligned_data.h
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2025-09-05 09:15:33 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-19 16:37:38 +0200
commit68a6729afd3e8e9a2a32538642ce92b96ccf9b1d (patch)
treec1d85041dc7be7d8bc49d37eb38b12ffa35241ac /include/net/aligned_data.h
parent43242aed9060bbcecf53bd2f5f8251d24e5f1c7f (diff)
hsr: hold rcu and dev lock for hsr_get_port_ndev
[ Upstream commit 847748fc66d08a89135a74e29362a66ba4e3ab15 ] hsr_get_port_ndev calls hsr_for_each_port, which need to hold rcu lock. On the other hand, before return the port device, we need to hold the device reference to avoid UaF in the caller function. Suggested-by: Paolo Abeni <pabeni@redhat.com> Fixes: 9c10dd8eed74 ("net: hsr: Create and export hsr_get_port_ndev()") Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250905091533.377443-4-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