public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix object refcount leak on mmappable size limit error path.
@ 2011-11-01  6:16 Eric Anholt
  2011-11-01  6:58 ` Keith Packard
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Anholt @ 2011-11-01  6:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: keithp, Eric Anholt, stable

I've been seeing memory leaks on my system in the form of large
(300-400MB) GEM objects created by now-dead processes laying around
clogging up memory.  I usually notice when it gets to about 1.2GB of
them.  Hopefully this clears up the issue, but I just found this bug
by inspection.

Signed-off-by: Eric Anholt <eric@anholt.net>
Cc: stable@kernel.org
---
 drivers/gpu/drm/i915/i915_gem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6c69cfa..ee78c8e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1477,7 +1477,7 @@ i915_gem_mmap_gtt(struct drm_file *file,
 
 	if (obj->base.size > dev_priv->mm.gtt_mappable_end) {
 		ret = -E2BIG;
-		goto unlock;
+		goto out;
 	}
 
 	if (obj->madv != I915_MADV_WILLNEED) {
-- 
1.7.7


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

* Re: [PATCH] drm/i915: Fix object refcount leak on mmappable size limit error path.
  2011-11-01  6:16 [PATCH] drm/i915: Fix object refcount leak on mmappable size limit error path Eric Anholt
@ 2011-11-01  6:58 ` Keith Packard
  2011-11-01 16:57   ` Eric Anholt
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Packard @ 2011-11-01  6:58 UTC (permalink / raw)
  To: Eric Anholt, linux-kernel; +Cc: Eric Anholt, stable

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

On Mon, 31 Oct 2011 23:16:21 -0700, Eric Anholt <eric@anholt.net> wrote:

> I've been seeing memory leaks on my system in the form of large
> (300-400MB) GEM objects created by now-dead processes laying around
> clogging up memory.  I usually notice when it gets to about 1.2GB of
> them.  Hopefully this clears up the issue, but I just found this bug
> by inspection.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>
> Cc: stable@kernel.org

Reviewed-by: Keith Packard <keithp@keithp.com

I wouldn't mind having someone audit the driver for more places where
drm_gem_object_lookup might not be paired with drm_gem_object_unreference...

-- 
keith.packard@intel.com

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

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

* Re: [PATCH] drm/i915: Fix object refcount leak on mmappable size limit error path.
  2011-11-01  6:58 ` Keith Packard
@ 2011-11-01 16:57   ` Eric Anholt
  2011-11-01 18:29     ` Keith Packard
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Anholt @ 2011-11-01 16:57 UTC (permalink / raw)
  To: Keith Packard, linux-kernel; +Cc: stable

[-- Attachment #1: Type: text/plain, Size: 874 bytes --]

On Mon, 31 Oct 2011 23:58:25 -0700, Keith Packard <keithp@keithp.com> wrote:
Non-text part: multipart/signed
> On Mon, 31 Oct 2011 23:16:21 -0700, Eric Anholt <eric@anholt.net> wrote:
> 
> > I've been seeing memory leaks on my system in the form of large
> > (300-400MB) GEM objects created by now-dead processes laying around
> > clogging up memory.  I usually notice when it gets to about 1.2GB of
> > them.  Hopefully this clears up the issue, but I just found this bug
> > by inspection.
> > 
> > Signed-off-by: Eric Anholt <eric@anholt.net>
> > Cc: stable@kernel.org
> 
> Reviewed-by: Keith Packard <keithp@keithp.com
> 
> I wouldn't mind having someone audit the driver for more places where
> drm_gem_object_lookup might not be paired with drm_gem_object_unreference...

I went ahead and finished the read-through, and everything else looks
good.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH] drm/i915: Fix object refcount leak on mmappable size limit error path.
  2011-11-01 16:57   ` Eric Anholt
@ 2011-11-01 18:29     ` Keith Packard
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Packard @ 2011-11-01 18:29 UTC (permalink / raw)
  To: Eric Anholt, linux-kernel; +Cc: stable

[-- Attachment #1: Type: text/plain, Size: 337 bytes --]

On Tue, 01 Nov 2011 09:57:27 -0700, Eric Anholt <eric@anholt.net> wrote:

> I went ahead and finished the read-through, and everything else looks
> good.

Thanks. I've merged your patch locally; it's on top of a couple of
patches that need some work, so I'll reorder stuff and push this out today.

-- 
keith.packard@intel.com

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

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

end of thread, other threads:[~2011-11-01 18:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-01  6:16 [PATCH] drm/i915: Fix object refcount leak on mmappable size limit error path Eric Anholt
2011-11-01  6:58 ` Keith Packard
2011-11-01 16:57   ` Eric Anholt
2011-11-01 18:29     ` Keith Packard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox