Re: [PATCH/RFC] KVM: mark vcpu->pid pointer as rcu protected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/06/2017 03:04 PM, Paolo Bonzini wrote:
> 
> 
> On 06/07/2017 14:51, Christian Borntraeger wrote:
>> +	/*
>> +	 * no need for rcu_read_lock as VCPU_RUN is the only place that
>> +	 * will change the vcpu->pid pointer and on uninit all file
>> +	 * descriptors are already gone.
>> +	 */
>> +	put_pid(rcu_dereference(vcpu->pid));
> 
> Hmm, I missed this.
> 
> This would fail with lockdep turned on, so you need
> 
>    rcu_dereference_protected(p, 1)

yes, will fix.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux