linux-stable/drivers/nvme/host
Maurizio Lombardi f6fe0b2d35 nvme-pci: fix sleeping function called from interrupt context
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)

Fixes: f50fff73d6 ("nvme: implement In-Band authentication")
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
2023-12-19 12:41:05 -08:00
..
Kconfig nvme: improve NVME_HOST_AUTH and NVME_TARGET_AUTH config descriptions 2023-12-04 08:39:03 -08:00
Makefile nvme: rework NVME_AUTH Kconfig selection 2023-10-12 08:04:49 -07:00
apple.c nvme-apple: return directly instead of else 2023-04-13 08:55:06 +02:00
auth.c nvme-auth: set explanation code for failure2 msgs 2023-11-20 09:25:23 -08:00
constants.c nvme fixes for Linux 6.5 2023-06-30 14:04:08 -06:00
core.c nvme-pci: fix sleeping function called from interrupt context 2023-12-19 12:41:05 -08:00
fabrics.c nvme: blank out authentication fabrics options if not configured 2023-11-20 09:25:32 -08:00
fabrics.h nvme-fabrics: parse options 'keyring' and 'tls_key' 2023-10-11 10:29:58 -07:00
fault_inject.c nvme: fix parameter check in nvme_fault_inject_init() 2023-07-12 08:48:33 -07:00
fc.c Revert "nvme-fc: fix race between error recovery and creating association" 2023-12-19 08:58:46 -08:00
fc.h
hwmon.c nvme: host: hwmon: constify pointers to hwmon_channel_info 2023-08-21 12:54:02 -07:00
ioctl.c nvme-ioctl: move capable() admin check to the end 2023-12-04 08:39:03 -08:00
multipath.c nvme fixes for Linux 6.5 2023-06-30 14:04:08 -06:00
nvme.h nvme-pci: Add sleep quirk for Kingston drives 2023-12-07 08:53:20 -08:00
pci.c nvme-pci: Add sleep quirk for Kingston drives 2023-12-07 08:53:20 -08:00
pr.c nvme: Add pr_ops read_reservation support 2023-04-11 21:55:36 -04:00
rdma.c nvme: ensure reset state check ordering 2023-12-04 08:39:03 -08:00
sysfs.c nvme: rework NVME_AUTH Kconfig selection 2023-10-12 08:04:49 -07:00
tcp.c nvme: ensure reset state check ordering 2023-12-04 08:39:03 -08:00
trace.c nvme: implement In-Band authentication 2022-08-02 17:14:49 -06:00
trace.h nvme: fix async event trace event 2023-04-13 08:59:04 +02:00
zns.c scsi: nvme: zns: Set zone limits before revalidating zones 2023-07-05 21:58:10 -04:00