diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c index e472cc37d7de..958d4aa77dca 100644 --- a/kernel/dma/debug.c +++ b/kernel/dma/debug.c @@ -1051,9 +1051,13 @@ static void check_unmap(struct dma_debug_entry *ref) } hash_bucket_del(entry); - dma_entry_free(entry); - put_hash_bucket(bucket, flags); + + /* + * Free the entry outside of bucket_lock to avoid ABBA deadlocks + * between that and radix_lock. + */ + dma_entry_free(entry); } static void check_for_stack(struct device *dev,