pvcalls-front: read all data before closing the connection
authorStefano Stabellini <sstabellini@kernel.org>
Fri, 21 Dec 2018 23:06:29 +0000 (15:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Feb 2019 09:08:50 +0000 (10:08 +0100)
commit9699f7a70eb8088f7b1f88b63f95dec78c45054e
tree5f95b814174fba82a81b94faf0c9f8c16ff09341
parent6bdf535f4aafc8f0ca20ec19212e217a2772aa1c
pvcalls-front: read all data before closing the connection

[ Upstream commit b79470b64fa9266948d1ce8d825ced94c4f63293 ]

When a connection is closing in_error is set to ENOTCONN. There could
still be outstanding data on the ring left by the backend. Before
closing the connection on the frontend side, drain the ring.

Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/xen/pvcalls-front.c