[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <99351d36-2fc6-d5b5-1ce2-bdd9bcbd68f4@redhat.com>
Date: Wed, 23 Aug 2017 11:16:24 +0200
From: David Hildenbrand <david@...hat.com>
To: Paul Mackerras <paulus@...abs.org>,
Nixiaoming <nixiaoming@...wei.com>
Cc: "agraf@...e.com" <agraf@...e.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
"mpe@...erman.id.au" <mpe@...erman.id.au>,
"kvm-ppc@...r.kernel.org" <kvm-ppc@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fix memory leak on kvm_vm_ioctl_create_spapr_tce
>>> + mutex_unlock(&kvm->lock);
>>> + kvm_put_kvm(kvm);
>>> + goto fail;
>>> + }
>>> + return ret;
>
> of simply
>
> if (!ret)
if (ret >= 0)
return ret;
is of course what I meant :)
> return 0;
>
> mutex_lock(&kvm->lock);
> list_del_rcu(&stt->list);
> mutex_unlock(&kvm->lock);
> kvm_put_kvm(kvm);
--
Thanks,
David
Powered by blists - more mailing lists