drm/i915: Fix object refcount leak on mmappable size limit error path.
Subsystems (2)
PATCH 1/1 drm/i915: Fix object refcount leak on mmappable size limit error path.
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.
--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +1 -1
@@ -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 ) {
Signature · 1 line
1.7.7
Quoted 8 lines · Eric Anholt
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 <[email protected]>
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...
Signature · 1 line
[email protected]
On Mon, 31 Oct 2011 23:58:25 -0700, Keith Packard <[email protected]> wrote:
Non-text part: multipart/signed
Quoted 8 lines · Eric Anholt
Quoted 7 lines
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.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Eric Anholt <[email protected]>Reviewed-by Keith Packard <[email protected]I wouldn't mind having someone audit the driver for more places where
drm_gem_object_lookupmight not be paired withdrm_gem_object_unreference...
I went ahead and finished the read-through, and everything else looks good.
Quoted 2 lines · Eric Anholt
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.
Signature · 1 line
[email protected]