[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 16/33] tools/libs/light: add backend type for 9pfs PV devices



On Thu, Jan 04, 2024 at 10:00:38AM +0100, Juergen Gross wrote:
> +static void libxl__device_p9_add(libxl__egc *egc, uint32_t domid,
> +                                 libxl_device_p9 *p9,
> +                                 libxl__ao_device *aodev)
> +{
> +    int rc;

Can you make a copy of `p9` here, or maybe in xen9pfsd_spawn? There's no
guaranty that `p9` will still be around by the time
xen9pfsd_spawn_outcome() is executed.

(with libxl_device_p9_copy())

> +    rc = xen9pfsd_spawn(egc, domid, p9, aodev);
> +    if (rc == 1)
> +        return;
> +
> +    if (rc == 0)
> +        libxl__device_add_async(egc, domid, &libxl__p9_devtype, p9, aodev);
> +
> +    aodev->rc = rc;
> +    if (rc)
> +        aodev->callback(egc, aodev);
> +}
> +

Cheers,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.