lkml.org 
[lkml]   [2023]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3] vfio: fix deadlock between group lock and kvm lock
From
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

\
 
 \ /
  Last update: 2023-03-27 00:09    [W:0.116 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site