Re: [PATCH] firewire: ohci: avoid potential deadlock when queueing AT local requests
From: Takashi Sakamoto
Date: Mon Nov 02 2026 - 22:57:01 EST
On Mon, Nov 02, 2026 at 12:30:58PM +0900, Takashi Sakamoto wrote:
> AT local requests are retrieved from the queue in process context
> (workqueue), while requests can be added to the queue from any context
> through __fw_send_request(). The queue is protected by a spinlock, but
> interrupts are still enabled when acquiring the lock in the former case.
>
> This can lead to a deadlock if the same lock is acquired from interrupt
> context while it is already held.
>
> Avoid the deadlock by using a pair of spin_lock_irqsave() and
> spin_unlock_irqrestore() to protect access to the queue.
>
> Fixes: 5fe52c6aa28e ("firewire: ohci: use workqueue to handle error case of AT request/response packet queueing")
> Signed-off-by: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx>
> ---
> drivers/firewire/ohci.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
Applied to for-linus branch.
Regards
Takashi Sakamoto