]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 26 Sep 2018 07:17:03 +0000 (02:17 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Oct 2018 07:27:23 +0000 (09:27 +0200)
commit71a0556255de125b7e3fc0dc6171fb31fab2b9ad
tree9323aab652fe517b2981d6d01eb2bd18c915444c
parent0c0dd182adae698ae108566e1300c498305d5aeb
drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set

commit 337fe9f5c1e7de1f391c6a692531379d2aa2ee11 upstream.

We attempt to get fences earlier in the hopes that everything will
already have fences and no callbacks will be needed.  If we do succeed
in getting a fence, getting one a second time will result in a duplicate
ref with no unref.  This is causing memory leaks in Vulkan applications
that create a lot of fences; playing for a few hours can, apparently,
bring down the system.

Cc: stable@vger.kernel.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107899
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180926071703.15257-1-jason.ekstrand@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_syncobj.c