The rule is: this is_huge_tmpfs() block of code could be used anywhere a lock serializing against mmu notifiers is held. It's arguable (mildly?) how broad of a clientele for huge tmpfs that is, outside kvm. Andres On Tue, Apr 5, 2016 at 11:47 PM, Paolo Bonzini wrote: > > > On 06/04/2016 03:12, Hugh Dickins wrote: > > Hah, you've lighted on precisely a line of code where I changed around > > what Andres had - I thought it nicer to pass down vcpu, because that > > matched the function above, and in many cases vcpu is not dereferenced > > here at all. So, definitely blame me not Andres for that interface. > > > > Oh, actually I'm fine with the interface if it's in arch/x86/kvm. I'm > just pointing out that---putting aside the locking question---it's a > pretty generic thing that doesn't really need access to KVM data > structures. > > Paolo > -- Andres Lagar-Cavilla | Google Kernel Team | andreslc@google.com