Files
linux/drivers
Stefan Hajnoczi 06477f7ef8 UPSTREAM: vhost/vsock: fix reset orphans race with close timeout
[ Upstream commit c38f57da42 ]

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@cadami.net>
Cc: Graham Whaley <graham.whaley@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 06ec6679fe)
Bug: 121166534
Test: Ran cuttlefish with android-4.4 + vsock adb tunnel
Signed-off-by: Cody Schuffelen <schuffelen@google.com>
Change-Id: I6b4564aebecc3938b789e56499a3f9b8bbbeb2a1
2019-01-15 17:08:38 -08:00
..
2018-07-22 14:25:52 +02:00
2018-10-13 10:39:05 +02:00
2018-11-27 16:20:35 +01:00
2018-12-21 14:09:53 +01:00
2018-12-01 10:03:54 +01:00
2018-07-03 18:23:34 +02:00
2018-11-27 16:20:35 +01:00
2018-12-21 14:09:52 +01:00
2018-02-25 11:03:51 +01:00
2019-01-13 10:34:49 +01:00
2018-09-15 12:08:41 +02:00
2019-01-13 10:34:49 +01:00
2018-11-21 11:22:37 +01:00
2018-12-01 10:03:54 +01:00
2018-12-01 10:03:54 +01:00
2018-03-22 09:57:28 +01:00
2018-11-27 16:20:35 +01:00
2019-01-13 10:34:49 +01:00
2018-11-10 07:41:42 -08:00
2018-12-21 14:28:48 +01:00
2018-12-21 14:09:52 +01:00
2019-01-13 10:34:49 +01:00
2018-11-21 09:27:37 +01:00
2018-12-19 16:36:52 +01:00
2018-11-21 09:27:36 +01:00
2018-12-21 14:28:48 +01:00
2018-11-27 16:08:02 +01:00
2019-01-13 10:34:49 +01:00
2018-10-10 08:52:04 +02:00
2018-12-19 16:36:52 +01:00
2018-11-21 11:22:37 +01:00