Re: [PATCHv2] dma-debug: don't call __dma_entry_alloc_check_leak() under free_entries_lock

From: Robin Murphy
Date: Thu Aug 24 2023 - 10:14:06 EST


On 24/08/2023 4:15 am, Sergey Senozhatsky wrote:
On (23/08/16 11:32), Sergey Senozhatsky wrote:
__dma_entry_alloc_check_leak() calls into printk -> serial console
output (qcom geni) and grabs port->lock under free_entries_lock
spin lock, which is a reverse locking dependency chain as qcom_geni
IRQ handler can call into dma-debug code and grab free_entries_lock
under port->lock.

Move __dma_entry_alloc_check_leak() call out of free_entries_lock
scope so that we don't acquire serial console's port->lock under it.

Hello folks,

Have you got a chance to take a look at the patch?

[ For some reason Microsoft seem convinced all your emails are spam, so I have to keep digging them out of quarantine :( ]

The patch itself looks reasonable enough to me, thanks for respinning.

Acked-by: Robin Murphy <robin.murphy@xxxxxxx>