summaryrefslogtreecommitdiff
path: root/fs/btrfs/tree-checker.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2018-12-06 19:14:34 +0000
committerAlistair Strachan <astrachan@google.com>2019-01-15 17:08:38 -0800
commit06477f7ef8c103a71d2e8a251681242f1846bd19 (patch)
tree78494cfd33f6447156a6e9040b0f703fb017e530 /fs/btrfs/tree-checker.c
parente633b6d8e0dfbb5d3497faabf19d9f42bd2f5827 (diff)
UPSTREAM: vhost/vsock: fix reset orphans race with close timeout
[ Upstream commit c38f57da428b033f2721b611d84b1f40bde674a8 ] 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 06ec6679fe12cacafce68ab7b509586482a2ae1b) Bug: 121166534 Test: Ran cuttlefish with android-4.4 + vsock adb tunnel Signed-off-by: Cody Schuffelen <schuffelen@google.com> Change-Id: I6b4564aebecc3938b789e56499a3f9b8bbbeb2a1
Diffstat (limited to 'fs/btrfs/tree-checker.c')
0 files changed, 0 insertions, 0 deletions