summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorYishai Hadas <yishaih@nvidia.com>2024-11-14 11:53:18 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-05 14:02:28 +0100
commit2b24c649235d9ebf86c0c42d2efef0da6e43361c (patch)
treeec805953bdbc3a3dc4e77dbe5c8e781e967e6e81 /tools/testing
parentc44f1b2ddfa81c8d7f8e9b6bc76c427bc00e69d5 (diff)
downloadlinux-2b24c649235d9ebf86c0c42d2efef0da6e43361c.tar.gz
linux-2b24c649235d9ebf86c0c42d2efef0da6e43361c.tar.bz2
linux-2b24c649235d9ebf86c0c42d2efef0da6e43361c.zip
vfio/mlx5: Fix unwind flows in mlx5vf_pci_save/resume_device_data()
[ Upstream commit cb04444c243c001fc27f275e84792ff1c2b96867 ] 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 <yishaih@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20241114095318.16556-3-yishaih@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions