Re: Re: [PATCH] fix memory leak on kvm_vm_ioctl_create_spapr_tce

From: Al Viro
Date: Sun Aug 27 2017 - 17:02:40 EST


On Wed, Aug 23, 2017 at 04:06:24PM +1000, Paul Mackerras wrote:

> It seems to me that it would be better to do the anon_inode_getfd()
> call before the kvm_get_kvm() call, and go to the fail label if it
> fails.

And what happens if another thread does close() on the (guessed) fd?