summaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorLongfang Liu <liulongfang@huawei.com>2026-10-13 15:19:28 +0800
committerAlex Williamson <alex@shazbot.org>2026-10-13 09:25:28 -0600
commite1d2d60b1f50296828d3f7ff26c45d1a90f142ef (patch)
tree3e124c51991c05fc8bca3956601d14d6c0fb9475 /kernel/workqueue.c
parent6a5f427bee12c82beaf13efbd133416da1541c39 (diff)
hisi_acc_vfio_pci: fix NULL dereference in reset_prepare on PF passthrough
When a PF is bound to the driver via driver_override and passed through to a VM, its pf_qm stays NULL. The PCI error handler reset_prepare() runs during open_device through pci_try_reset_function(), before the mig_ops gate, and dereferences the NULL pf_qm for the timeout log, crashing the kernel. Move the mig_ops check to the entry of reset_prepare() and aer_reset_done() so non-migration devices skip the QM_RESETTING coordination. The dev local resolved &qm->pdev->dev before the gate, so open code it at the dev_err() call where qm is known valid. Also clear set_reset_flag together with QM_RESETTING in aer_reset_done(); the flag was never cleared before, so a later timed-out reset could release a foreign lock. Fixes: b0eed085903e ("hisi_acc_vfio_pci: Add support for VFIO live migration") Fixes: a22099ed7936f ("hisi_acc_vfio_pci: fix VF reset timeout issue") Signed-off-by: Longfang Liu <liulongfang@huawei.com> Link: https://lore.kernel.org/r/20261013071929.3988687-2-liulongfang@huawei.com Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'kernel/workqueue.c')
0 files changed, 0 insertions, 0 deletions