mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firewire: ohci: avoid potential deadlock when queueing AT local requests
Date: Tue, 3 Nov 2026 12:56:50 +0900	[thread overview]
Message-ID: <20261103035650.GA1229640@sakamocchi.jp> (raw)
In-Reply-To: <20261102033058.1184485-1-o-takashi@sakamocchi.jp>

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@sakamocchi.jp>
> ---
>  drivers/firewire/ohci.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

Applied to for-linus branch.


Regards

Takashi Sakamoto

      reply	other threads:[~2026-11-03  3:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02  3:30 Takashi Sakamoto
2026-11-03  3:56 ` Takashi Sakamoto [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261103035650.GA1229640@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®