[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH] libxl: Check return value of libxl__xs_directory in name2bdf
On Mon, Jul 11, 2022 at 7:03 PM Juergen Gross <jgross@xxxxxxxx> wrote: > > On 11.07.22 12:38, Anthony PERARD wrote: > > libxl__xs_directory() can potentially return NULL without setting `n`. > > As `n` isn't initialised, we need to check libxl__xs_directory() > > return value before checking `n`. Otherwise, `n` might be non-zero > > with `bdfs` NULL which would lead to a segv. > > > > Reported-by: "G.R." <firemeteor@xxxxxxxxxxxxxxxxxxxxx> > > Fixes: 57bff091f4 ("libxl: add 'name' field to 'libxl_device_pci' in the > > IDL...") > > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> > > Reviewed-by: Juergen Gross <jgross@xxxxxxxx> Hi Anthony, I can confirm that the change fixed the segment fault issue I observed on 4.16.1 release. However, the behavior is still not entirely clean after the fix. But that's probably a separate issue. I have two devices assigned to pckback through kernel command-line. When I attempted to use pci-assignable-remove on the SSD that caused me a lot of trouble, it fails on the first attempt but works fine later... root@gaia:~# xl pci-assignable-list 0000:00:17.0 0000:05:00.0 root@gaia:~# xl pci-assignable-remove 05:00.0 libxl: error: libxl_pci.c:906:libxl__device_pci_assignable_remove: failed to de-quarantine 0000:05:00.0 root@gaia:~# xl pci-assignable-list 0000:00:17.0 0000:05:00.0 root@gaia:~# xl pci-assignable-add 05:00.0 libxl: warning: libxl_pci.c:802:libxl__device_pci_assignable_add: 0000:05:00.0 already assigned to pciback root@gaia:~# xl pci-assignable-list 0000:00:17.0 0000:05:00.0 root@gaia:~# xl pci-assignable-remove 05:00.0 root@gaia:~# xl pci-assignable-list 0000:00:17.0 root@gaia:~# xl pci-assignable-add 05:00.0 libxl: warning: libxl_pci.c:822:libxl__device_pci_assignable_add: 0000:05:00.0 not bound to a driver, will not be rebound. root@gaia:~# xl pci-assignable-list 0000:00:17.0 0000:05:00.0 I'm no longer in a debug environment, so cannot collect more debug info right now. Thanks, G.R.
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |