[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xenstore: fix crash on platforms with no gntdev driver implementation.
# HG changeset patch # User Christoph Egger <Christoph.Egger@xxxxxxx> # Date 1338286365 -3600 # Node ID a81a4c3b5cfd669477f865f632f928c881acac0e # Parent 093db53213e62bec8f2d9367f2a73090e0ed3fa9 xenstore: fix crash on platforms with no gntdev driver implementation. Fix pointer checks introduced in changeset 24757:aae516b78fce. Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r 093db53213e6 -r a81a4c3b5cfd tools/xenstore/xenstored_domain.c --- a/tools/xenstore/xenstored_domain.c Tue May 29 10:31:39 2012 +0100 +++ b/tools/xenstore/xenstored_domain.c Tue May 29 11:12:45 2012 +0100 @@ -167,7 +167,7 @@ static int readchn(struct connection *co static void *map_interface(domid_t domid, unsigned long mfn) { - if (*xcg_handle >= 0) { + if (*xcg_handle != NULL) { /* this is the preferred method */ return xc_gnttab_map_grant_ref(*xcg_handle, domid, GNTTAB_RESERVED_XENSTORE, PROT_READ|PROT_WRITE); @@ -179,7 +179,7 @@ static void *map_interface(domid_t domid static void unmap_interface(void *interface) { - if (*xcg_handle >= 0) + if (*xcg_handle != NULL) xc_gnttab_munmap(*xcg_handle, interface, 1); else munmap(interface, getpagesize()); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |