On 15.01.24 16:38, Anthony PERARD wrote:
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())
Okay.
+ 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);
+}
+
Juergen