From: Jens Axboe <axboe@kernel.dk>
To: Maurizio Lombardi <mlombard@redhat.com>, kbusch@kernel.org
Cc: linux-nvme@lists.infradead.org, sagi@grimberg.me
Subject: Re: [PATCH V2] nvme-pci: fix sleeping function called from interrupt context
Date: Tue, 19 Dec 2023 09:22:47 -0700 [thread overview]
Message-ID: <25a78b1e-783b-40ea-a12e-8fb316b2eafb@kernel.dk> (raw)
In-Reply-To: <20231219154201.438767-1-mlombard@redhat.com>
On 12/19/23 8:42 AM, Maurizio Lombardi wrote:
> the nvme_handle_cqe() interrupt handler calls nvme_complete_async_event()
> but the latter may call nvme_auth_stop() which is a blocking function.
> Sleeping functions can't be called in interrupt context
>
> BUG: sleeping function called from invalid context
> in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/15
> Call Trace:
> <IRQ>
> __cancel_work_timer+0x31e/0x460
> ? nvme_change_ctrl_state+0xcf/0x3c0 [nvme_core]
> ? nvme_change_ctrl_state+0xcf/0x3c0 [nvme_core]
> nvme_complete_async_event+0x365/0x480 [nvme_core]
> nvme_poll_cq+0x262/0xe50 [nvme]
>
> Fix the bug by moving nvme_auth_stop() to fw_act_work
> (executed by the nvme_wq workqueue)
Since this looks like more auth fallout, can we get a fixes tag in here
for this?
> V2: Just move nvme_auth_stop() out of nvme_handle_aen_notice()
> so the latter can be safely called from interrupt context
Changelog stuff goes below the '---' line, not in the commit message.
With those two tweaks, patch looks good to me.
--
Jens Axboe
prev parent reply other threads:[~2023-12-19 16:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 15:42 [PATCH V2] nvme-pci: fix sleeping function called from interrupt context Maurizio Lombardi
2023-12-19 16:22 ` 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=25a78b1e-783b-40ea-a12e-8fb316b2eafb@kernel.dk \
--to=axboe@kernel.dk \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mlombard@redhat.com \
--cc=sagi@grimberg.me \
/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