[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231012135016.GJ55194@ziepe.ca>
Date: Thu, 12 Oct 2023 10:50:16 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>
Cc: Brett Creeley <brett.creeley@....com>,
"yishaih@...dia.com" <yishaih@...dia.com>,
"kevin.tian@...el.com" <kevin.tian@...el.com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"dan.carpenter@...aro.org" <dan.carpenter@...aro.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"shannon.nelson@....com" <shannon.nelson@....com>
Subject: Re: [PATCH v2 vfio 2/3] pds/vfio: Fix mutex lock->magic != lock
warning
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@....com>
> > Reviewed-by: Shannon Nelson <shannon.nelson@....com>
>
> Reviewed-by: Shameer Kolothum <shameerali.kolothum.thodi@...wei.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
Powered by blists - more mailing lists