From: Daniel Vetter <daniel@ffwll.ch>
To: Arun Siluvery <arun.siluvery@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, Mika Kuoppala <mika.kuoppala@intel.com>
Subject: Re: [PATCH v1 1/4] drm/i915: Do kunmap if renderstate parsing fails
Date: Tue, 21 Jul 2015 09:26:33 +0200 [thread overview]
Message-ID: <20150721072633.GS16722@phenom.ffwll.local> (raw)
In-Reply-To: <1437149334-33617-2-git-send-email-arun.siluvery@linux.intel.com>
On Fri, Jul 17, 2015 at 05:08:51PM +0100, Arun Siluvery wrote:
> From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>
> Kunmap the renderstate page on error path.
>
> Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_gem_render_state.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_render_state.c b/drivers/gpu/drm/i915/i915_gem_render_state.c
> index a0201fc..b6492fe 100644
> --- a/drivers/gpu/drm/i915/i915_gem_render_state.c
> +++ b/drivers/gpu/drm/i915/i915_gem_render_state.c
> @@ -96,8 +96,10 @@ static int render_state_setup(struct render_state *so)
> s = lower_32_bits(r);
> if (so->gen >= 8) {
> if (i + 1 >= rodata->batch_items ||
> - rodata->batch[i + 1] != 0)
> - return -EINVAL;
> + rodata->batch[i + 1] != 0) {
> + ret = -EINVAL;
> + goto err_out;
> + }
>
> d[i++] = s;
> s = upper_32_bits(r);
> @@ -120,6 +122,10 @@ static int render_state_setup(struct render_state *so)
> }
>
> return 0;
> +
> +err_out:
> + kunmap(page);
> + return ret;
> }
>
> void i915_gem_render_state_fini(struct render_state *so)
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-07-21 7:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 16:08 [PATCH v1 0/4] Add Pooled EU support to BXT Arun Siluvery
2015-07-17 16:08 ` [PATCH v1 1/4] drm/i915: Do kunmap if renderstate parsing fails Arun Siluvery
2015-07-21 7:26 ` Daniel Vetter [this message]
2015-07-17 16:08 ` [PATCH v1 2/4] drm/i915: Add provision to extend Golden context batch Arun Siluvery
2015-07-17 16:23 ` Chris Wilson
2015-07-17 16:37 ` Mika Kuoppala
2015-07-17 16:48 ` Chris Wilson
2015-07-17 16:08 ` [PATCH v1 3/4] drm/i915:bxt: Enable Pooled EU support Arun Siluvery
2015-07-17 16:27 ` Chris Wilson
2015-07-17 16:50 ` Mika Kuoppala
2015-07-17 16:54 ` Siluvery, Arun
2015-07-17 16:58 ` Chris Wilson
2015-07-17 16:08 ` [PATCH v1 4/4] drm/i915/bxt: Add get_param to query Pooled EU availability Arun Siluvery
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=20150721072633.GS16722@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=arun.siluvery@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@intel.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