1
0
Fork 0
alistair23-linux/drivers/xen/xenbus
Juergen Gross d9d4ea17d6 xen/xenbus: ensure xenbus_map_ring_valloc() returns proper grant status
[ Upstream commit 6b51fd3f65 ]

xenbus_map_ring_valloc() maps a ring page and returns the status of the
used grant (0 meaning success).

There are Xen hypervisors which might return the value 1 for the status
of a failed grant mapping due to a bug. Some callers of
xenbus_map_ring_valloc() test for errors by testing the returned status
to be less than zero, resulting in no error detected and crashing later
due to a not available ring page.

Set the return value of xenbus_map_ring_valloc() to GNTST_general_error
in case the grant status reported by Xen is greater than zero.

This is part of XSA-316.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wl@xen.org>
Link: https://lore.kernel.org/r/20200326080358.1018-1-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-05-02 08:48:57 +02:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xenbus.h xenbus: Avoid deadlock during suspend due to open transactions 2019-05-28 17:32:15 -04:00
xenbus_client.c xen/xenbus: ensure xenbus_map_ring_valloc() returns proper grant status 2020-05-02 08:48:57 +02:00
xenbus_comms.c xenbus: req->err should be updated before req->state 2020-03-25 08:25:49 +01:00
xenbus_dev_backend.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xenbus_dev_frontend.c xen/xenbus: fix self-deadlock after killing user process 2019-10-02 16:40:11 -04:00
xenbus_probe.c xen: export device state to sysfs 2018-08-28 17:37:40 -04:00
xenbus_probe_backend.c xen: modify xenstore watch event interface 2017-02-09 11:26:49 -05:00
xenbus_probe_frontend.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
xenbus_xs.c xenbus: req->body should be updated before req->state 2020-03-25 08:25:49 +01:00