From: Jason Gunthorpe <jgg@ziepe.ca>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
Cc: Brett Creeley <brett.creeley@amd.com>,
"yishaih@nvidia.com" <yishaih@nvidia.com>,
"kevin.tian@intel.com" <kevin.tian@intel.com>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"dan.carpenter@linaro.org" <dan.carpenter@linaro.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"shannon.nelson@amd.com" <shannon.nelson@amd.com>
Subject: Re: [PATCH v2 vfio 2/3] pds/vfio: Fix mutex lock->magic != lock warning
Date: Thu, 12 Oct 2023 10:50:16 -0300 [thread overview]
Message-ID: <20231012135016.GJ55194@ziepe.ca> (raw)
In-Reply-To: <591f90f071454dcd82d8de1178241e3c@huawei.com>
On Thu, Oct 12, 2023 at 09:00:09AM +0000, Shameerali Kolothum Thodi wrote:
> > Also, don't destroy the mutex on close because the device may
> > be re-opened, which would cause mutex to be uninitialized. Fix this by
> > implementing a driver specific vfio_device_ops.release callback that
> > destroys the mutex before calling vfio_pci_core_release_dev().
> >
> > Signed-off-by: Brett Creeley <brett.creeley@amd.com>
> > Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
>
> Reviewed-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
>
> Looks like mutex destruction logic needs to be added to HiSilicon driver as well.
> From a quick look mlx5 also doesn't destroy the state_mutex.
FWIW, mutex_destroy is a debugging feature, it is nice if you can do it, but
not a bug if it is missing..
Jason
next prev parent reply other threads:[~2023-10-12 13:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 23:01 [PATCH v2 vfio 0/3] pds/vfio: Fixes for locking bugs Brett Creeley
2023-10-11 23:01 ` [PATCH v2 vfio 1/3] pds/vfio: Fix spinlock bad magic BUG Brett Creeley
2023-10-12 8:44 ` Shameerali Kolothum Thodi
2023-10-11 23:01 ` [PATCH v2 vfio 2/3] pds/vfio: Fix mutex lock->magic != lock warning Brett Creeley
2023-10-12 9:00 ` Shameerali Kolothum Thodi
2023-10-12 13:50 ` Jason Gunthorpe [this message]
2023-10-11 23:01 ` [PATCH v2 vfio 3/3] pds/vfio: Fix possible sleep while in atomic context Brett Creeley
2023-10-13 21:09 ` [PATCH v2 vfio 0/3] pds/vfio: Fixes for locking bugs Alex Williamson
2023-10-16 14:49 ` Brett Creeley
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=20231012135016.GJ55194@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=alex.williamson@redhat.com \
--cc=brett.creeley@amd.com \
--cc=dan.carpenter@linaro.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shannon.nelson@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox