All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Unset mmap_offset on failure path.
@ 2010-07-10  7:58 Chris Wilson
  2010-07-10  8:05 ` Chris Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2010-07-10  7:58 UTC (permalink / raw
  To: intel-gfx; +Cc: stable

If we fail to correctly setup the mapping for an object, make sure that
we nullify the pointer within the object after tearing down. Otherwise,
we may later attempt to reuse the invalid pointer...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
---
 drivers/gpu/drm/i915/i915_gem.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 52643dd..ed2803f 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1261,6 +1261,7 @@ out_free_mm:
 	drm_mm_put_block(list->file_offset_node);
 out_free_list:
 	kfree(list->map);
+	list->map = NULL;
 
 	return ret;
 }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/i915: Unset mmap_offset on failure path.
  2010-07-10  7:58 [PATCH] drm/i915: Unset mmap_offset on failure path Chris Wilson
@ 2010-07-10  8:05 ` Chris Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2010-07-10  8:05 UTC (permalink / raw
  To: intel-gfx; +Cc: stable

On Sat, 10 Jul 2010 08:58:55 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> If we fail to correctly setup the mapping for an object, make sure that
> we nullify the pointer within the object after tearing down. Otherwise,
> we may later attempt to reuse the invalid pointer...

False alarm. It's guarded by mmap_offset.
-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-10 14:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-10  7:58 [PATCH] drm/i915: Unset mmap_offset on failure path Chris Wilson
2010-07-10  8:05 ` Chris Wilson

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.