]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix memleak in runtime wakeref tracking
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Mon, 1 Jul 2019 10:44:42 +0000 (13:44 +0300)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 2 Jul 2019 15:00:20 +0000 (16:00 +0100)
commitade1d059b2696cb28f297e9c3d57baee80c76f1d
tree55379322d258f055eea40b4670de8af32bdabc72
parentea7295ea90024c8cf71b400127abad66df1c2bda
drm/i915: Fix memleak in runtime wakeref tracking

If we untrack wakerefs, the actual count may reach zero.
However the krealloced owners array is still there and
needs to be taken care of. Free the owners unconditionally
to fix the leak.

Fixes: 60f952d75a57 ("drm/i915: Track all held rpm wakerefs")
Reported-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190701104442.9319-1-mika.kuoppala@linux.intel.com
drivers/gpu/drm/i915/intel_runtime_pm.c