Skip to content

Commit d0a4ebe

Browse files
committed
Merge tag 'for-linus-5.7-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen update from Juergen Gross: - a small cleanup patch - a security fix for a bug in the Xen hypervisor to avoid enabling Xen guests to crash dom0 on an unfixed hypervisor. * tag 'for-linus-5.7-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: arm/xen: make _xen_start_info static xen/xenbus: ensure xenbus_map_ring_valloc() returns proper grant status
2 parents a2286a4 + 74f4c43 commit d0a4ebe

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

arch/arm/xen/enlighten.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#include <linux/mm.h>
3838

39-
struct start_info _xen_start_info;
39+
static struct start_info _xen_start_info;
4040
struct start_info *xen_start_info = &_xen_start_info;
4141
EXPORT_SYMBOL(xen_start_info);
4242

drivers/xen/xenbus/xenbus_client.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,14 @@ EXPORT_SYMBOL_GPL(xenbus_free_evtchn);
448448
int xenbus_map_ring_valloc(struct xenbus_device *dev, grant_ref_t *gnt_refs,
449449
unsigned int nr_grefs, void **vaddr)
450450
{
451-
return ring_ops->map(dev, gnt_refs, nr_grefs, vaddr);
451+
int err;
452+
453+
err = ring_ops->map(dev, gnt_refs, nr_grefs, vaddr);
454+
/* Some hypervisors are buggy and can return 1. */
455+
if (err > 0)
456+
err = GNTST_general_error;
457+
458+
return err;
452459
}
453460
EXPORT_SYMBOL_GPL(xenbus_map_ring_valloc);
454461

0 commit comments

Comments
 (0)