From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Vasiliy Kulikov <segoon@openwall.com>, linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Nitin Gupta <ngupta@vflare.org>,
devel@driverdev.osuosl.org
Subject: RE: [PATCH] staging: zcache: fix memory leak
Date: Thu, 10 Feb 2011 10:24:18 -0800 (PST) [thread overview]
Message-ID: <7f8a2950-7145-438a-9118-2a71a0502fdd@default> (raw)
In-Reply-To: <1297360839-21602-1-git-send-email-segoon@openwall.com>
> From: Vasiliy Kulikov [mailto:segoon@openwall.com]
> Sent: Thursday, February 10, 2011 11:01 AM
>
> obj is not freed if __get_free_page() failed.
>
> Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Thanks Vasiliy! Good catch!
> drivers/staging/zcache/zcache.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/staging/zcache/zcache.c
> b/drivers/staging/zcache/zcache.c
> index 61be849..b8a2b30 100644
> --- a/drivers/staging/zcache/zcache.c
> +++ b/drivers/staging/zcache/zcache.c
> @@ -790,6 +790,7 @@ static int zcache_do_preload(struct tmem_pool
> *pool)
> page = (void *)__get_free_page(ZCACHE_GFP_MASK);
> if (unlikely(page == NULL)) {
> zcache_failed_get_free_pages++;
> + kmem_cache_free(zcache_obj_cache, obj);
> goto unlock_out;
> }
> preempt_disable();
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
prev parent reply other threads:[~2011-02-10 18:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 18:00 Vasiliy Kulikov
2011-02-10 18:24 ` Dan Magenheimer [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=7f8a2950-7145-438a-9118-2a71a0502fdd@default \
--to=dan.magenheimer@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ngupta@vflare.org \
--cc=segoon@openwall.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®