Re: [PATCH] s390/vfio-ap: do not open code locks for VFIO_GROUP_NOTIFY_SET_KVM notification

From: Halil Pasic
Date: Mon Jul 12 2021 - 19:38:38 EST


On Wed, 7 Jul 2021 11:41:56 -0400
Tony Krowiak <akrowiak@xxxxxxxxxxxxx> wrote:

> It was pointed out during an unrelated patch review that locks should not
> be open coded - i.e., writing the algorithm of a standard lock in a
> function instead of using a lock from the standard library. The setting and
> testing of the kvm_busy flag and sleeping on a wait_event is the same thing
> a lock does. Whatever potential deadlock was found and reported via the
> lockdep splat was not magically removed by going to a wait_queue; it just
> removed the lockdep annotations that would identify the issue early

Did you change your opinion since we last talked about it? This reads to
me like we are deadlocky without this patch, because of the last
sentence.

Regards,
Halil