OSDN Git Service

UPSTREAM: vhost-vsock: fix orphan connection reset
authorPeng Tao <bergwolf@gmail.com>
Thu, 8 Dec 2016 17:10:46 +0000 (01:10 +0800)
committerAlistair Strachan <astrachan@google.com>
Wed, 16 Jan 2019 01:08:36 +0000 (17:08 -0800)
commitf95e936b327d46040db3d9d786ac8a67a21ee1f9
tree4b9bea37104443eaa5f8f9b9658a3eaa8237ed9d
parentde7a923e3093d57d3c5e93757c88347f97d5b6a2
UPSTREAM: vhost-vsock: fix orphan connection reset

local_addr.svm_cid is host cid. We should check guest cid instead,
which is remote_addr.svm_cid. Otherwise we end up resetting all
connections to all guests.

Cc: stable@vger.kernel.org [4.8+]
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit c4587631c7bad47c045e081d1553cd73a23be59a)
Bug: 121166534
Test: Ran cuttlefish with android-4.4 + vsock adb tunnel
Signed-off-by: Cody Schuffelen <schuffelen@google.com>
Change-Id: Ib9bf9e1f0befa71f4ebc0ff0cdcef7115a41b110
drivers/vhost/vsock.c