On 20/05/26 15:24, Narayana Murty N wrote:
+ VFIOLegacyContainer *container = vfio_eeh_as_container(&sphb->iommu_as);
+ struct vfio_eeh_pe_op op = {
+ .op = VFIO_EEH_PE_INJECT_ERR,
+ .argsz = sizeof(op),
+ };
+
[...]
+ /* Perform the ioctl to inject the error */
+ if (ioctl(container->fd, VFIO_EEH_PE_OP, &op) < 0) {
+ return RTAS_OUT_HW_ERROR;
+ }
Hi Narayana,
Sorry, one detail I missed in my previous review:
Could `container` be NULL here if `vfio_eeh_as_container()` fails or
returns NULL? If so, should we add a NULL check before dereferencing
`container->fd`?
Thanks,
Nikhil