]> git.baikalelectronics.ru Git - kernel.git/commit
drm/syncobj: fix leaking dma_fence in drm_syncobj_query_ioctl
authorChristian König <christian.koenig@amd.com>
Mon, 22 Jul 2019 12:56:25 +0000 (14:56 +0200)
committerChristian König <christian.koenig@amd.com>
Tue, 30 Jul 2019 10:27:39 +0000 (12:27 +0200)
commitad41c009f75e3b1b51f5087723e68ed7de1d5b19
tree1e7bfc2fd9793a7d44a05fe95bf4a7937c8854e6
parentf5da099dca712e6924227bda6d429bcdef85988d
drm/syncobj: fix leaking dma_fence in drm_syncobj_query_ioctl

We need to check the context number instead if the previous sequence to detect
an error and if an error is detected we need to drop the reference to the
current fence or otherwise would leak it.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b013ae7532da ("drm/syncobj: add timeline payload query ioctl v6")
Link: https://patchwork.freedesktop.org/patch/319123/
drivers/gpu/drm/drm_syncobj.c