[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DS0PR11MB75294E12D65903C07AAD8F92C3D79@DS0PR11MB7529.namprd11.prod.outlook.com>
Date: Fri, 3 Feb 2023 14:48:26 +0000
From: "Liu, Yi L" <yi.l.liu@...el.com>
To: Matthew Rosato <mjrosato@...ux.ibm.com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"jgg@...dia.com" <jgg@...dia.com>
CC: "cohuck@...hat.com" <cohuck@...hat.com>,
"farman@...ux.ibm.com" <farman@...ux.ibm.com>,
"pmorel@...ux.ibm.com" <pmorel@...ux.ibm.com>,
"borntraeger@...ux.ibm.com" <borntraeger@...ux.ibm.com>,
"frankja@...ux.ibm.com" <frankja@...ux.ibm.com>,
"imbrenda@...ux.ibm.com" <imbrenda@...ux.ibm.com>,
"david@...hat.com" <david@...hat.com>,
"akrowiak@...ux.ibm.com" <akrowiak@...ux.ibm.com>,
"jjherne@...ux.ibm.com" <jjherne@...ux.ibm.com>,
"pasic@...ux.ibm.com" <pasic@...ux.ibm.com>,
"zhenyuw@...ux.intel.com" <zhenyuw@...ux.intel.com>,
"Wang, Zhi A" <zhi.a.wang@...el.com>,
"Christopherson,, Sean" <seanjc@...gle.com>,
"Tian, Kevin" <kevin.tian@...el.com>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"intel-gvt-dev@...ts.freedesktop.org"
<intel-gvt-dev@...ts.freedesktop.org>,
"intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3] vfio: fix deadlock between group lock and kvm lock
> From: Matthew Rosato <mjrosato@...ux.ibm.com>
> Sent: Friday, February 3, 2023 10:26 PM
>
> On 2/3/23 3:58 AM, Liu, Yi L wrote:
> > Hi Matthew,
> >
> ...
> >> * Can't pass group->kvm to vfio_device_open, as it references the value
> >> outside of new lock. Pass device->kvm to minimize changes in this
> >> fix (Alex, Yi)
> ...
> >> @@ -361,7 +420,6 @@ static int vfio_device_first_open(struct
> vfio_device
> >> *device,
> >> if (ret)
> >> goto err_module_put;
> >>
> >> - device->kvm = kvm;
> >
> > Since you've deleted the only usage of kvm pointer in this function, I
> > guess you can remove the kvm parameter from vfio_device_open()
> > and vfio_device_first_open(). :-) if it makes this patch too big, may
> > just have another patch to do it.
> >
>
> Hi Yi,
>
> Yeah, I mentioned it briefly (and vaguely I guess) in the cover, that was
> intentionally left out to reduce the patch size since this is a fix. I thought
> that was the consensus from the v2 comments anyway.
>
> If I end up doing a v4 for this I can just include the removal as a 2nd patch
> (without a fixes tag) and Alex can squash or keep separate as preferred -- if
> not you can feel free to do that removal with your cdev follow-up that
> exploits this work.
Sure. 😊
Regards,
Yi Liu
Powered by blists - more mailing lists