This reverts commit a408c0ca0c411ca1ead995bdae3112a806c87556. This causes a lockdep splat. Not really the right fix, but changing this is more work than expected.
Signed-off-by: Christian König <[email protected]> --- drivers/dma-buf/dma-fence-chain.c | 3 ++- include/linux/dma-fence-chain.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c index a707792b6025..a8a90acf4f34 100644 --- a/drivers/dma-buf/dma-fence-chain.c +++ b/drivers/dma-buf/dma-fence-chain.c @@ -245,6 +245,7 @@ void dma_fence_chain_init(struct dma_fence_chain *chain, struct dma_fence_chain *prev_chain = to_dma_fence_chain(prev); uint64_t context; + spin_lock_init(&chain->lock); rcu_assign_pointer(chain->prev, prev); chain->fence = fence; chain->prev_seqno = 0; @@ -260,7 +261,7 @@ void dma_fence_chain_init(struct dma_fence_chain *chain, seqno = max(prev->seqno, seqno); } - dma_fence_init64(&chain->base, &dma_fence_chain_ops, NULL, + dma_fence_init64(&chain->base, &dma_fence_chain_ops, &chain->lock, context, seqno); /* diff --git a/include/linux/dma-fence-chain.h b/include/linux/dma-fence-chain.h index df3beadf1515..5cd3ba53b4a1 100644 --- a/include/linux/dma-fence-chain.h +++ b/include/linux/dma-fence-chain.h @@ -46,6 +46,7 @@ struct dma_fence_chain { */ struct irq_work work; }; + spinlock_t lock; }; -- 2.43.0
