Chris Wilson
182c594668
dma-buf/fence: Fix lock inversion within dma-fence-array
[ Upstream commit 03e4e0a9e0 ]
Ages ago Rob Clark noted,
"Currently with fence-array, we have a potential deadlock situation. If
we fence_add_callback() on an array-fence, the array-fence's lock is
acquired first, and in it's ->enable_signaling() callback, it will install
cbs on it's array-member fences, so the array-member's lock is acquired
second.
But in the signal path, the array-member's lock is acquired first, and
the array-fence's lock acquired second."
Rob proposed either extensive changes to dma-fence to unnest the
fence-array signaling, or to defer the signaling onto a workqueue. This
is a more refined version of the later, that should keep the latency
of the fence signaling to a minimum by using an irq-work, which is
executed asap.
Reported-by: Rob Clark <robdclark@gmail.com>
Suggested-by: Rob Clark <robdclark@gmail.com>
References: 1476635975-21981-1-git-send-email-robdclark@gmail.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171114162719.30958-1-chris@chris-wilson.co.uk
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-19 08:42:47 +01:00
..
2017-12-25 14:26:26 +01:00
2018-03-03 10:24:28 +01:00
2018-02-16 20:22:56 +01:00
2017-12-20 10:10:18 +01:00
2018-03-19 08:42:46 +01:00
2018-02-16 20:22:56 +01:00
2017-12-29 17:53:47 +01:00
2017-12-25 14:26:19 +01:00
2017-12-29 17:53:47 +01:00
2018-01-02 20:31:05 +01:00
2017-12-25 14:26:33 +01:00
2018-01-31 14:03:50 +01:00
2018-02-22 15:42:23 +01:00
2017-12-25 14:26:33 +01:00
2018-03-15 10:54:36 +01:00
2018-03-15 10:54:36 +01:00
2017-12-25 14:26:33 +01:00
2018-02-22 15:42:19 +01:00
2018-01-17 09:45:27 +01:00
2018-01-10 09:31:20 +01:00
2018-01-02 20:31:15 +01:00
2018-02-22 15:42:20 +01:00
2018-01-17 09:45:27 +01:00
2017-12-20 10:10:18 +01:00
2018-02-16 20:23:00 +01:00
2018-01-23 19:58:13 +01:00
2018-03-19 08:42:47 +01:00
2018-02-22 15:42:23 +01:00
2018-01-10 09:31:18 +01:00
2018-02-07 11:12:23 -08:00
2018-02-22 15:42:23 +01:00
2018-03-08 22:41:06 -08:00
2018-01-10 09:31:19 +01:00
2017-12-14 09:53:08 +01:00
2018-02-22 15:42:23 +01:00
2017-12-05 11:26:28 +01:00
2017-12-14 09:52:49 +01:00
2017-12-25 14:26:20 +01:00
2018-03-15 10:54:36 +01:00
2017-12-25 14:26:20 +01:00
2018-02-22 15:42:24 +01:00
2018-01-02 20:31:06 +01:00
2018-02-22 15:42:26 +01:00
2018-02-28 10:19:41 +01:00
2018-02-03 17:39:06 +01:00
2017-12-25 14:26:33 +01:00
2017-12-05 11:26:29 +01:00
2018-02-22 15:42:31 +01:00
2018-02-22 15:42:23 +01:00
2017-12-25 14:26:16 +01:00
2017-12-20 10:10:26 +01:00
2017-12-25 14:26:15 +01:00
2018-02-07 11:12:18 -08:00
2018-02-22 15:42:23 +01:00
2017-12-17 15:07:58 +01:00
2017-12-17 15:07:58 +01:00
2018-02-16 20:22:58 +01:00
2018-03-15 10:54:35 +01:00
2017-12-20 10:10:18 +01:00
2018-03-19 08:42:44 +01:00
2018-02-16 20:22:56 +01:00
2018-01-02 20:30:56 +01:00
2018-02-25 11:07:48 +01:00
2017-12-17 15:07:57 +01:00
2017-12-25 14:26:21 +01:00
2017-12-25 14:26:21 +01:00
2018-02-22 15:42:23 +01:00
2018-03-03 10:24:21 +01:00
2018-02-25 11:07:53 +01:00
2018-01-17 09:45:22 +01:00
2018-02-22 15:42:23 +01:00
2018-02-22 15:42:23 +01:00
2017-12-20 10:10:17 +01:00
2018-01-23 19:58:21 +01:00
2017-12-14 09:52:52 +01:00
2018-01-02 20:31:09 +01:00
2018-02-22 15:42:23 +01:00
2018-01-02 20:31:05 +01:00
2018-01-02 20:31:15 +01:00
2018-03-15 10:54:24 +01:00
2018-02-03 17:39:19 +01:00
2018-02-25 11:07:45 +01:00
2018-01-31 14:03:41 +01:00
2017-12-17 15:07:58 +01:00
2018-03-15 10:54:29 +01:00