[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xenforeignmemory: work around bug in older privcmd
On Tue, Aug 28, 2018 at 03:12:32PM +0100, Andrew Cooper wrote: > On 24/08/18 13:16, Paul Durrant wrote: > > diff --git a/tools/libs/foreignmemory/linux.c > > b/tools/libs/foreignmemory/linux.c > > index 3686cf41e0..0368aa09f4 100644 > > --- a/tools/libs/foreignmemory/linux.c > > +++ b/tools/libs/foreignmemory/linux.c > > @@ -53,6 +53,23 @@ int osdep_xenforeignmemory_open(xenforeignmemory_handle > > *fmem) > > return -1; > > } > > > > + /* > > + * Older versions of privcmd return -EINVAL for unimplemented ioctls > > + * so we need to probe for the errno to use rather than just using > > + * the conventional ENOTTY. > > + */ > > + if ( ioctl(fd, IOCTL_PRIVCMD_UNIMPLEMENTED, NULL) >= 0 ) > > + { > > + xtl_log(fmem->logger, XTL_ERROR, -1, "xenforeignmemory", > > + "privcmd ioctl should not be implemented"); > > This error path leaks fd. Patch sent. Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |