Re: [PATCH] vhost/vsock: fix reset orphans race with close timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
Date: Thu,  6 Dec 2018 19:14:34 +0000

> If a local process has closed a connected socket and hasn't received a
> RST packet yet, then the socket remains in the table until a timeout
> expires.
> 
> When a vhost_vsock instance is released with the timeout still pending,
> the socket is never freed because vhost_vsock has already set the
> SOCK_DONE flag.
> 
> Check if the close timer is pending and let it close the socket.  This
> prevents the race which can leak sockets.
> 
> Reported-by: Maximilian Riemensberger <riemensberger@xxxxxxxxxx>
> Cc: Graham Whaley <graham.whaley@xxxxxxxxx>
> Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>

Michael please review, and let me know if you want me to apply this
directly and queue it up for -stable.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux