]> git.baikalelectronics.ru Git - kernel.git/commit
drm/etnaviv: fix ref count leak via pm_runtime_get_sync
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Mon, 15 Jun 2020 06:12:20 +0000 (01:12 -0500)
committerLucas Stach <l.stach@pengutronix.de>
Fri, 17 Jul 2020 15:10:34 +0000 (17:10 +0200)
commit7814d38452d28d49e079db8de8d81c03caf6587d
tree1a42966580e46728ed331b64ae5e6e515eb3a4d8
parent08fa627d71e20370d7057de14ae9f77be0b93701
drm/etnaviv: fix ref count leak via pm_runtime_get_sync

in etnaviv_gpu_submit, etnaviv_gpu_recover_hang, etnaviv_gpu_debugfs,
and etnaviv_gpu_init the call to pm_runtime_get_sync increments the
counter even in case of failure, leading to incorrect ref count.
In case of failure, decrement the ref count before returning.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_gpu.c