From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Cong Ding <dinggnu@gmail.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
Gleb Natapov <gleb@redhat.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
linux390@de.ibm.com, Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390: kvm/sigp.c: fix memory leakage
Date: Tue, 15 Jan 2013 11:08:36 +0100 [thread overview]
Message-ID: <20130115110836.771d1622@gondolin> (raw)
In-Reply-To: <1358199594-15594-1-git-send-email-dinggnu@gmail.com>
On Mon, 14 Jan 2013 22:39:54 +0100
Cong Ding <dinggnu@gmail.com> wrote:
> the variable inti should be freed in the branch CPUSTAT_STOPPED.
>
> Signed-off-by: Cong Ding <dinggnu@gmail.com>
> ---
> arch/s390/kvm/sigp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
> index 461e841..1c48ab2 100644
> --- a/arch/s390/kvm/sigp.c
> +++ b/arch/s390/kvm/sigp.c
> @@ -137,8 +137,10 @@ static int __inject_sigp_stop(struct kvm_s390_local_interrupt *li, int action)
> inti->type = KVM_S390_SIGP_STOP;
>
> spin_lock_bh(&li->lock);
> - if ((atomic_read(li->cpuflags) & CPUSTAT_STOPPED))
> + if ((atomic_read(li->cpuflags) & CPUSTAT_STOPPED)) {
> + kfree(inti);
> goto out;
> + }
> list_add_tail(&inti->list, &li->list);
> atomic_set(&li->active, 1);
> atomic_set_mask(CPUSTAT_STOP_INT, li->cpuflags);
Thanks, applied.
prev parent reply other threads:[~2013-01-15 10:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 21:39 [PATCH] s390: kvm/sigp.c: fix memory leakage Cong Ding
2013-01-15 10:08 ` Cornelia Huck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130115110836.771d1622@gondolin \
--to=cornelia.huck@de.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=dinggnu@gmail.com \
--cc=gleb@redhat.com \
--cc=heiko.carstens@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux390@de.ibm.com \
--cc=mtosatti@redhat.com \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.