Re: [PATCH] KVM: PPC: Book3S HV: Protect updates to spapr_tce_tables list

2017-08-28 Thread David Gibson
On Mon, Aug 28, 2017 at 02:42:29PM +1000, Paul Mackerras wrote: > Al Viro pointed out that while one thread of a process is executing > in kvm_vm_ioctl_create_spapr_tce(), another thread could guess the > file descriptor returned by anon_inode_getfd() and close() it before > the first thread has ad

[PATCH] KVM: PPC: Book3S HV: Protect updates to spapr_tce_tables list

2017-08-27 Thread Paul Mackerras
Al Viro pointed out that while one thread of a process is executing in kvm_vm_ioctl_create_spapr_tce(), another thread could guess the file descriptor returned by anon_inode_getfd() and close() it before the first thread has added it to the kvm->arch.spapr_tce_tables list. That highlights a more ge