On Tue, Nov 08, 2022, Hao Peng wrote: > From: Peng Hao <flyingpeng@xxxxxxxxxxx> > > Acquire SRCU before taking the gpc spinlock in wait_pending_event() so as > to be consistent with all other functions that acquire both locks. It's > not illegal to acquire SRCU inside a spinlock, nor is there deadlock > potential, but in general it's preferable to order locks from least > restrictive to most restrictive, e.g. if wait_pending_event() needed to > sleep for whatever reason, it could do so while holding SRCU, but would > need to drop the spinlock. > > Thanks Sean Christopherson for the comment. > > Signed-off-by: Peng Hao <flyingpeng@xxxxxxxxxxx> > Reviewed-by: Sean Christopherson <seanjc@xxxxxxxxxx> > --- Merged to kvm/queue, thanks! https://lore.kernel.org/all/Y4lHxds8pvBhxXFX@xxxxxxxxxx