]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dma-buf: Discard old fence_excl on retrying get_fences_rcu for realloc
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 4 Jun 2019 12:53:23 +0000 (13:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jul 2019 06:28:36 +0000 (08:28 +0200)
commit4528cbb9659195c82bf80745e5abdc14e9ecbb79
treec82c7b853a633930ae3155b2f4984afea541da4b
parent19fab82084e094800ceb5cb3e5f6411769524152
dma-buf: Discard old fence_excl on retrying get_fences_rcu for realloc

commit f5b07b04e5f090a85d1e96938520f2b2b58e4a8e upstream.

If we have to drop the seqcount & rcu lock to perform a krealloc, we
have to restart the loop. In doing so, be careful not to lose track of
the already acquired exclusive fence.

Fixes: fedf54132d24 ("dma-buf: Restart reservation_object_get_fences_rcu() after writes")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: stable@vger.kernel.org #v4.10
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190604125323.21396-1-chris@chris-wilson.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma-buf/reservation.c