From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Manjunath Goudar <manjunath.goudar@linaro.org>
Cc: patches@linaro.org, linaro-kernel@lists.linaro.org,
Jeyaraman R <jeyaraman.rangasamy@lge.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
David Howells <dhowells@redhat.com>,
dsaxena@linaro.org, Dave Airlie <airlied@redhat.com>,
Dave Jones <davej@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH] DRM: TTM: Fix memory leak issue in ttm_agp_tt_create().
Date: Fri, 6 Sep 2013 09:23:00 -0400 [thread overview]
Message-ID: <20130906132300.GH2590@phenom.dumpdata.com> (raw)
In-Reply-To: <1378276090-10130-1-git-send-email-manjunath.goudar@linaro.org>
On Wed, Sep 04, 2013 at 11:58:10AM +0530, Manjunath Goudar wrote:
> From: Jeyaraman R <jeyaraman.rangasamy@lge.com>
>
> This patch adds kfree() in ttm_agp_tt_create() to avoide the
> memory leak, without this there is a chance of memory leak in
> ttm_tt_init() fail case.
>
> Signed-off-by: Jeyaraman R <jeyaraman.rangasamy@lge.com>
> Signed-off-by: Manjunath Goudar <manjunath.goudar@linaro.org>
> Cc: David Airlie <airlied@linux.ie>
> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Dave Jones <davej@redhat.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-kernel@vger.kernel.org
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> drivers/gpu/drm/ttm/ttm_agp_backend.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> index 3302f99..764be36 100644
> --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
> +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> @@ -126,6 +126,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_bo_device *bdev,
> agp_be->ttm.func = &ttm_agp_func;
>
> if (ttm_tt_init(&agp_be->ttm, bdev, size, page_flags, dummy_read_page)) {
> + kfree(agp_be);
> return NULL;
> }
>
> --
> 1.8.1.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2013-09-06 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-04 6:28 [PATCH] DRM: TTM: Fix memory leak issue in ttm_agp_tt_create() Manjunath Goudar
2013-09-06 13:23 ` Konrad Rzeszutek Wilk [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-10-08 10:36 Majunath Goudar
2013-10-08 10:36 ` Majunath Goudar
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=20130906132300.GH2590@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=airlied@redhat.com \
--cc=davej@redhat.com \
--cc=dhowells@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=dsaxena@linaro.org \
--cc=jeyaraman.rangasamy@lge.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manjunath.goudar@linaro.org \
--cc=patches@linaro.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
/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.