Skip to content

Commit

Permalink
drm/i915: Fix object refcount leak on mmappable size limit error path.
Browse files Browse the repository at this point in the history
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
Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
Eric Anholt authored and Keith Packard committed Nov 1, 2011
1 parent 627f767 commit ff56b0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,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) {
Expand Down

0 comments on commit ff56b0b

Please sign in to comment.