diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c index de02c0808fb8..3e6f2a39beb3 100644 --- a/kernel/dma/debug.c +++ b/kernel/dma/debug.c @@ -1044,9 +1044,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,