lkml.org 
[lkml]   [2023]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] vfio: fix potential deadlock on vfio group lock
On Thu, Jan 12, 2023 at 04:51:36PM -0500, Matthew Rosato wrote:

> Yep, thanks. I will surround this bit of code with
>
> mutex_lock(&device->dev_set->lock);
> ..
> mutex_unlock(&device->dev_set->lock);

Don't do it like that, copy the kvm out of the struct device to the
stack and NULL it. Then do the put without holding any locks.

Jason

\
 
 \ /
  Last update: 2023-03-26 23:39    [W:1.005 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site