RE: [PATCH next] vfio/xe: Fix use after free in xe_vfio_pci_alloc_file()
From: Tian, Kevin
Date: Thu Dec 11 2025 - 23:07:24 EST
> From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Sent: Friday, December 5, 2025 7:39 PM
>
> This code frees "migf" and then dereferences it on the next line to get
> the error code. Preserve the error code before freeing the pointer.
>
> Fixes: 2e38c50ae492 ("vfio/xe: Add device specific vfio_pci driver variant for
> Intel graphics")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>