Files
linux/net/smc
Kuniyuki Iwashima f6adf7a180 smc: Use __sk_dst_get() and dst_dev_rcu() in smc_vlan_by_tcpsk().
[ Upstream commit 0b0e4d51c6 ]

smc_vlan_by_tcpsk() fetches sk_dst_get(sk)->dev before RTNL and
passes it to netdev_walk_all_lower_dev(), which is illegal.

Also, smc_vlan_by_tcpsk_walk() does not require RTNL at all.

Let's use __sk_dst_get(), dst_dev_rcu(), and
netdev_walk_all_lower_dev_rcu().

Note that the returned value of smc_vlan_by_tcpsk() is not used
in the caller.

Fixes: 0cfdd8f92c ("smc: connection and link group creation")
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250916214758.650211-5-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-15 12:04:00 +02:00
..
2024-06-17 13:14:09 +01:00
2025-06-23 17:04:03 -07:00
2024-06-17 13:14:09 +01:00