public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Rosato <mjrosato@linux.ibm.com>
To: "Liu, Yi L" <yi.l.liu@intel.com>,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"jgg@nvidia.com" <jgg@nvidia.com>
Cc: "cohuck@redhat.com" <cohuck@redhat.com>,
	"farman@linux.ibm.com" <farman@linux.ibm.com>,
	"pmorel@linux.ibm.com" <pmorel@linux.ibm.com>,
	"borntraeger@linux.ibm.com" <borntraeger@linux.ibm.com>,
	"frankja@linux.ibm.com" <frankja@linux.ibm.com>,
	"imbrenda@linux.ibm.com" <imbrenda@linux.ibm.com>,
	"david@redhat.com" <david@redhat.com>,
	"akrowiak@linux.ibm.com" <akrowiak@linux.ibm.com>,
	"jjherne@linux.ibm.com" <jjherne@linux.ibm.com>,
	"pasic@linux.ibm.com" <pasic@linux.ibm.com>,
	"zhenyuw@linux.intel.com" <zhenyuw@linux.intel.com>,
	"Wang, Zhi A" <zhi.a.wang@intel.com>, "Christopherson, ,
	Sean" <seanjc@google.com>, "Tian, Kevin" <kevin.tian@intel.com>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"intel-gvt-dev@lists.freedesktop.org" 
	<intel-gvt-dev@lists.freedesktop.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] vfio: fix deadlock between group lock and kvm lock
Date: Fri, 3 Feb 2023 09:26:15 -0500	[thread overview]
Message-ID: <d322c7d4-9643-a0f4-1575-0cf4c3eb2bc8@linux.ibm.com> (raw)
In-Reply-To: <DS0PR11MB75295F851A74ACE7CAFB0ACCC3D79@DS0PR11MB7529.namprd11.prod.outlook.com>

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.   

Thanks,
Matt


  reply	other threads:[~2023-02-03 14:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 16:24 [PATCH v3] vfio: fix deadlock between group lock and kvm lock Matthew Rosato
2023-02-02 19:42 ` Alex Williamson
2023-02-02 23:04   ` Tian, Kevin
2023-02-02 23:13     ` Alex Williamson
2023-02-03  2:00       ` Tian, Kevin
2023-02-03 13:32         ` Liu, Yi L
2023-02-03 13:49           ` Alex Williamson
2023-02-03 14:54             ` Liu, Yi L
2023-02-03 15:19               ` Alex Williamson
2023-02-03 17:29                 ` Matthew Rosato
2023-02-03 20:35                   ` Alex Williamson
2023-02-03 21:19                     ` Matthew Rosato
2023-02-03 21:35                       ` Alex Williamson
2023-02-03  8:58 ` Liu, Yi L
2023-02-03 14:26   ` Matthew Rosato [this message]
2023-02-03 14:48     ` Liu, Yi L

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=d322c7d4-9643-a0f4-1575-0cf4c3eb2bc8@linux.ibm.com \
    --to=mjrosato@linux.ibm.com \
    --cc=akrowiak@linux.ibm.com \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=jgg@nvidia.com \
    --cc=jjherne@linux.ibm.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=pmorel@linux.ibm.com \
    --cc=seanjc@google.com \
    --cc=yi.l.liu@intel.com \
    --cc=zhenyuw@linux.intel.com \
    --cc=zhi.a.wang@intel.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