Re: [PATCH v5 0/8] In-kernel XICS interrupt controller emulation

Paul Mackerras
2013-04-26T23:52:47Z

On Fri, Apr 26, 2013 at 12:13:33PM -0500, Scott Wood wrote:

> Also please note that we no longer hold kvm->lock during device
> creation, so your EEXIST check looks racy.

Huh? Patch 2/8 adds this code:

+ mutex_lock(&kvm->lock);
+ if (kvm->arch.xics)
+ ret = -EEXIST;
+ else
+ kvm->arch.xics = xics;
+ mutex_unlock(&kvm->lock);

How is that racy?

Paul.