From: Jens Axboe <axboe@kernel.dk>
To: hch@lst.de, yukuai3@huawei.com, Yu Kuai <yukuai1@huaweicloud.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
yi.zhang@huawei.com, yangerkun@huawei.com
Subject: Re: [PATCH -next] blk-ioc: fix recursive spin_lock/unlock_irq() in ioc_clear_queue()
Date: Wed, 07 Jun 2023 07:52:32 -0600 [thread overview]
Message-ID: <168614595209.134969.6798849940705397930.b4-ty@kernel.dk> (raw)
In-Reply-To: <20230606011438.3743440-1-yukuai1@huaweicloud.com>
On Tue, 06 Jun 2023 09:14:38 +0800, Yu Kuai wrote:
> Recursive spin_lock/unlock_irq() is not safe, because spin_unlock_irq()
> will enable irq unconditionally:
>
> spin_lock_irq queue_lock -> disable irq
> spin_lock_irq ioc->lock
> spin_unlock_irq ioc->lock -> enable irq
> /*
> * AA dead lock will be triggered if current context is preempted by irq,
> * and irq try to hold queue_lock again.
> */
> spin_unlock_irq queue_lock
>
> [...]
Applied, thanks!
[1/1] blk-ioc: fix recursive spin_lock/unlock_irq() in ioc_clear_queue()
commit: a7cfa0af0c88353b4eb59db5a2a0fbe35329b3f9
Best regards,
--
Jens Axboe
prev parent reply other threads:[~2023-06-07 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 1:14 Yu Kuai
2023-06-07 5:33 ` Christoph Hellwig
2023-06-07 13:52 ` Jens Axboe [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=168614595209.134969.6798849940705397930.b4-ty@kernel.dk \
--to=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@huawei.com \
/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®