Commit 650dd7ec authored by Eric Anholt's avatar Eric Anholt Committed by Greg Kroah-Hartman

drm/i915: Fix object refcount leak on mmappable size limit error path.

commit 14660ccd upstream.

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: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent aa85ae01
......@@ -1475,7 +1475,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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment