From d4d05c6e6e719e38074ed755378b91b0925a4d2c Mon Sep 17 00:00:00 2001 From: "T.J. Mercier" Date: Thu, 16 Feb 2023 19:17:27 +0000 Subject: [PATCH] ANDROID: dma-buf: heaps: Don't lock unused dmabuf_page_pool mutex On backports where the dmabuf_page_pool mutex could not be completely removed because of KMI constraints, we lock the mutex to prevent anyone from acquiring it. While this is fine for regular builds, lockdep reports a deadlock because of this behavior. So here we remove the call to mutex_lock for this unused mutex. Bug: 269576779 Fixes: d55aeb40292f ("BACKPORT: ANDROID: dma-buf: heaps: replace mutex lock with spinlock") Change-Id: Ic426b6e435ec4ac7b0355c50ec9ea14d38acfa43 Signed-off-by: T.J. Mercier --- drivers/dma-buf/heaps/page_pool.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/dma-buf/heaps/page_pool.c b/drivers/dma-buf/heaps/page_pool.c index de9d72809412..9d3ddb5c381a 100644 --- a/drivers/dma-buf/heaps/page_pool.c +++ b/drivers/dma-buf/heaps/page_pool.c @@ -144,7 +144,6 @@ struct dmabuf_page_pool *dmabuf_page_pool_create(gfp_t gfp_mask, unsigned int or pool->gfp_mask = gfp_mask | __GFP_COMP; pool->order = order; mutex_init(&pool->mutex); /* No longer used! */ - mutex_lock(&pool->mutex); /* Make sure anyone who attempts to acquire this hangs */ mutex_lock(&pool_list_lock); list_add(&pool->list, &pool_list);