]> git.baikalelectronics.ru Git - kernel.git/commit
dma-fence: Avoid list_del during fence->cb_list iteration
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 17 Aug 2019 14:47:34 +0000 (15:47 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 17 Aug 2019 17:03:00 +0000 (18:03 +0100)
commit78ef924646d980f329bd0c7223993a953d0421bf
tree9461feb021ab3950edcb90efe4c2936f09c67bf0
parent3b4735d596f13d7c87410b0c0a5df117d7a16879
dma-fence: Avoid list_del during fence->cb_list iteration

Before we notify the fence signal callback, we remove the cb from the
list. However, since we are processing the entire list from underneath
the spinlock, we do not need to individual delete each element, but can
simply reset the link and the entire list.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190817144736.7826-4-chris@chris-wilson.co.uk
drivers/dma-buf/dma-fence.c