diff options
| author | Yishai Hadas <[email protected]> | 2024-11-14 09:53:18 +0000 |
|---|---|---|
| committer | Alex Williamson <[email protected]> | 2024-11-14 18:42:18 +0000 |
| commit | cb04444c243c001fc27f275e84792ff1c2b96867 (patch) | |
| tree | 829645acf81c57c8e2afa025f424aa1acfe75ed9 /drivers/platform/x86/intel/pmt/class.c | |
| parent | vfio/mlx5: Fix an unwind issue in mlx5vf_add_migration_pages() (diff) | |
| download | kernel-cb04444c243c001fc27f275e84792ff1c2b96867.tar.gz kernel-cb04444c243c001fc27f275e84792ff1c2b96867.zip | |
vfio/mlx5: Fix unwind flows in mlx5vf_pci_save/resume_device_data()
Fix unwind flows in mlx5vf_pci_save_device_data() and
mlx5vf_pci_resume_device_data() to avoid freeing the migf pointer at the
'end' label, as this will be handled by fput(migf->filp) through
mlx5vf_release_file().
To ensure mlx5vf_release_file() functions correctly, move the
initialization of migf fields (such as migf->lock) to occur before any
potential unwind flow, as these fields may be accessed within
mlx5vf_release_file().
Fixes: 9945a67ea4b3 ("vfio/mlx5: Refactor PD usage")
Signed-off-by: Yishai Hadas <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions
