diff options
Diffstat (limited to 'net/vmw_vsock/virtio_transport.c')
-rw-r--r-- | net/vmw_vsock/virtio_transport.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index cc70d651d13e..e34979fcefd2 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c | |||
@@ -373,11 +373,14 @@ static void virtio_vsock_event_fill(struct virtio_vsock *vsock) | |||
373 | 373 | ||
374 | static void virtio_vsock_reset_sock(struct sock *sk) | 374 | static void virtio_vsock_reset_sock(struct sock *sk) |
375 | { | 375 | { |
376 | lock_sock(sk); | 376 | /* vmci_transport.c doesn't take sk_lock here either. At least we're |
377 | * under vsock_table_lock so the sock cannot disappear while we're | ||
378 | * executing. | ||
379 | */ | ||
380 | |||
377 | sk->sk_state = TCP_CLOSE; | 381 | sk->sk_state = TCP_CLOSE; |
378 | sk->sk_err = ECONNRESET; | 382 | sk->sk_err = ECONNRESET; |
379 | sk->sk_error_report(sk); | 383 | sk->sk_error_report(sk); |
380 | release_sock(sk); | ||
381 | } | 384 | } |
382 | 385 | ||
383 | static void virtio_vsock_update_guest_cid(struct virtio_vsock *vsock) | 386 | static void virtio_vsock_update_guest_cid(struct virtio_vsock *vsock) |