summaryrefslogtreecommitdiff
path: root/arch/x86/Makefile
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2021-02-09 09:52:19 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-23 13:58:13 +0100
commit15da94e7ae338690bbdb4d6f89dae6624bd176c9 (patch)
treee9b3ca664e8b47daa483fe8bc2587b6b90a6184d /arch/x86/Makefile
parent0895725435014701c23f710be3d191eecf484b19 (diff)
vsock: fix locking in vsock_shutdown()
commit 1c5fae9c9a092574398a17facc31c533791ef232 upstream. In vsock_shutdown() we touched some socket fields without holding the socket lock, such as 'state' and 'sk_flags'. Also, after the introduction of multi-transport, we are accessing 'vsk->transport' in vsock_send_shutdown() without holding the lock and this call can be made while the connection is in progress, so the transport can change in the meantime. To avoid issues, we hold the socket lock when we enter in vsock_shutdown() and release it when we leave. Among the transports that implement the 'shutdown' callback, only hyperv_transport acquired the lock. Since the caller now holds it, we no longer take it. Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/Makefile')
0 files changed, 0 insertions, 0 deletions