Re: [PATCH kernel] KVM: PPC: Improve KVM reference counting

2019-02-22 Thread Paul Mackerras
On Thu, Feb 21, 2019 at 02:44:14PM +1100, Alexey Kardashevskiy wrote: > The anon fd's ops releases the KVM reference in the release hook. > However we reference the KVM object after we create the fd so there is > small window when the release function can be called and > dereferenced the KVM object

Re: [PATCH kernel] KVM: PPC: Improve KVM reference counting

2019-02-21 Thread Alexey Kardashevskiy
On 21/02/2019 17:26, Michael Ellerman wrote: > Alexey Kardashevskiy writes: > >> The anon fd's ops releases the KVM reference in the release hook. >> However we reference the KVM object after we create the fd so there is >> small window when the release function can be called and >> dereferenc

Re: [PATCH kernel] KVM: PPC: Improve KVM reference counting

2019-02-20 Thread Michael Ellerman
Alexey Kardashevskiy writes: > The anon fd's ops releases the KVM reference in the release hook. > However we reference the KVM object after we create the fd so there is > small window when the release function can be called and > dereferenced the KVM object which potentially may free it. deref

[PATCH kernel] KVM: PPC: Improve KVM reference counting

2019-02-20 Thread Alexey Kardashevskiy
The anon fd's ops releases the KVM reference in the release hook. However we reference the KVM object after we create the fd so there is small window when the release function can be called and dereferenced the KVM object which potentially may free it. It is not a problem at the moment as the file