From: Jason Gunthorpe <jgg@nvidia.com>
To: Yishai Hadas <yishaih@nvidia.com>
Cc: alex.williamson@redhat.com, kvm@vger.kernel.org,
kevin.tian@intel.com, joao.m.martins@oracle.com,
leonro@nvidia.com, maorg@nvidia.com
Subject: Re: [PATCH vfio 2/2] vfio/mlx5: Fix unwind flows in mlx5vf_pci_save/resume_device_data()
Date: Thu, 14 Nov 2024 12:28:16 -0400 [thread overview]
Message-ID: <20241114162816.GR35230@nvidia.com> (raw)
In-Reply-To: <20241114095318.16556-3-yishaih@nvidia.com>
On Thu, Nov 14, 2024 at 11:53:18AM +0200, Yishai Hadas wrote:
> 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>
> ---
> drivers/vfio/pci/mlx5/main.c | 35 +++++++++++++++++------------------
> 1 file changed, 17 insertions(+), 18 deletions(-)
Tricky
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
next prev parent reply other threads:[~2024-11-14 16:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 9:53 [PATCH vfio 0/2] Fix several unwind issues in the mlx5/vfio driver Yishai Hadas
2024-11-14 9:53 ` [PATCH vfio 1/2] vfio/mlx5: Fix an unwind issue in mlx5vf_add_migration_pages() Yishai Hadas
2024-11-14 16:26 ` Jason Gunthorpe
2024-11-14 9:53 ` [PATCH vfio 2/2] vfio/mlx5: Fix unwind flows in mlx5vf_pci_save/resume_device_data() Yishai Hadas
2024-11-14 16:28 ` Jason Gunthorpe [this message]
2024-11-14 19:12 ` [PATCH vfio 0/2] Fix several unwind issues in the mlx5/vfio driver Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241114162816.GR35230@nvidia.com \
--to=jgg@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=joao.m.martins@oracle.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=leonro@nvidia.com \
--cc=maorg@nvidia.com \
--cc=yishaih@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.