]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
vfio/xe: avoid duplicate reset in xe_vfio_pci_reset_done
authorGuoHan Zhao <zhaoguohan@kylinos.cn>
Mon, 27 Apr 2026 01:21:28 +0000 (09:21 +0800)
committerAlex Williamson <alex@shazbot.org>
Wed, 20 May 2026 20:52:21 +0000 (14:52 -0600)
xe_vfio_pci_reset_done() sets deferred_reset and, when it manages to
acquire state_mutex itself, hands the cleanup off to
xe_vfio_pci_state_mutex_unlock().

That helper already clears deferred_reset and runs xe_vfio_pci_reset()
before dropping the mutex. Calling xe_vfio_pci_reset() again right
afterwards repeats the reset handling unnecessarily.

Fixes: 1f5556ec8b9e ("vfio/xe: Add device specific vfio_pci driver variant for Intel graphics")
Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: MichaƂ Winiarski <michal.winiarski@intel.com>
Link: https://lore.kernel.org/r/20260427012128.117051-1-zhaoguohan@kylinos.cn
Signed-off-by: Alex Williamson <alex@shazbot.org>
drivers/vfio/pci/xe/main.c

index 4ecadbbfd86ec73306cd6804aa8d01b850f8380a..cbff5af385ef537091cc1642f7f749d4f24ee310 100644 (file)
@@ -135,8 +135,6 @@ static void xe_vfio_pci_reset_done(struct pci_dev *pdev)
        }
        spin_unlock(&xe_vdev->reset_lock);
        xe_vfio_pci_state_mutex_unlock(xe_vdev);
-
-       xe_vfio_pci_reset(xe_vdev);
 }
 
 static const struct pci_error_handlers xe_vfio_pci_err_handlers = {