tcp: sk->sk_bound_dev_if once in inet_request_bound_dev_if()
authorEric Dumazet <edumazet@google.com>
Fri, 13 May 2022 18:55:43 +0000 (11:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:13 +0000 (17:25 +0200)
commitb8e29f64458318efbbdf3fb9820a2722cbd509be
tree6665425add96fafdbe6a7ef59798f016fff99ac7
parentbf3134feffe61b7a0e21f60a04743f8da0958b53
tcp: sk->sk_bound_dev_if once in inet_request_bound_dev_if()

[ Upstream commit fdb5fd7f736ec7ae9fb36d2842ea6d9ebc4e7269 ]

inet_request_bound_dev_if() reads sk->sk_bound_dev_if twice
while listener socket is not locked.

Another cpu could change this field under us.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/inet_sock.h