block-6.7-2023-12-22

-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmWFvNgQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpgrXD/4lKwu9jUT4Bf8n9KFxAGaZh1TKXZUFw986
 k9RoRb+njKnJba8WV/dyqvu7Ne4AgDFsKWcK2FAsGsnQA2uJ86yG3YMEHnEiveuE
 hkV4AuEZwARpSgNVKAAOHKiRaLcBq60p29+zkRv3OEtKlykOxVh4LeA5FvIrp+TU
 sVZ7fGkcs4gZE3oWRycjkhDnUme+pMY/t06R+m6oTWr2t9QJFRdbmgzHlOgdP1X+
 9+kF87mvYNBxyY7EXqJSfzxF/VwPSbZND6Lt5u3iSiZLlLEcwXsV+N/UgSHioJK3
 uM/q35FmBcIVma9gf2tqzcSMBsCjbabB2EFPJ4GgtTF0apFDi5fEXKyh3uyE4Qtf
 rVRKfZ34HpG+Np8OnyXoGnRMwqs4mapCj2Cxtp8OsAjUoB6yrUjXLLkx/Q+AE5En
 7BZ0V66yhr9DArZfx8PA3nro0cYs2wad5Hq7n0rBLlfwNrKpXDnRQGOr37n5/6WP
 Zq29aTKJU89Z8LDIwsaAdFDNJRy9W+mQis5FlEf/p8hCpB6IDEiO5AL5QB3zsmDJ
 DCaWMHf4MTeAJsYfufKyRg/IBK4aRZ050Ec7W7+XROqXLfjCvTUNJKNfJGhWRMAk
 74fKFd3D74KapE44XubZbY34SbTBjZtWir/Q78dCQ+hejexQuIY46HnICAPmY4so
 nyRdTG96ug==
 =RMx8
 -----END PGP SIGNATURE-----

Merge tag 'block-6.7-2023-12-22' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:
 "Just an NVMe pull request this time, with a fix for bad sleeping
  context, and a revert of a patch that caused some trouble"

* tag 'block-6.7-2023-12-22' of git://git.kernel.dk/linux:
  nvme-pci: fix sleeping function called from interrupt context
  Revert "nvme-fc: fix race between error recovery and creating association"
This commit is contained in:
Linus Torvalds 2023-12-22 19:36:48 -08:00
commit 5254c0cbc9
2 changed files with 7 additions and 17 deletions

View File

@ -4137,6 +4137,8 @@ static void nvme_fw_act_work(struct work_struct *work)
struct nvme_ctrl, fw_act_work);
unsigned long fw_act_timeout;
nvme_auth_stop(ctrl);
if (ctrl->mtfa)
fw_act_timeout = jiffies +
msecs_to_jiffies(ctrl->mtfa * 100);
@ -4192,7 +4194,6 @@ static bool nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)
* firmware activation.
*/
if (nvme_change_ctrl_state(ctrl, NVME_CTRL_RESETTING)) {
nvme_auth_stop(ctrl);
requeue = false;
queue_work(nvme_wq, &ctrl->fw_act_work);
}

View File

@ -2548,24 +2548,17 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg)
* the controller. Abort any ios on the association and let the
* create_association error path resolve things.
*/
enum nvme_ctrl_state state;
unsigned long flags;
spin_lock_irqsave(&ctrl->lock, flags);
state = ctrl->ctrl.state;
if (state == NVME_CTRL_CONNECTING) {
set_bit(ASSOC_FAILED, &ctrl->flags);
spin_unlock_irqrestore(&ctrl->lock, flags);
if (ctrl->ctrl.state == NVME_CTRL_CONNECTING) {
__nvme_fc_abort_outstanding_ios(ctrl, true);
set_bit(ASSOC_FAILED, &ctrl->flags);
dev_warn(ctrl->ctrl.device,
"NVME-FC{%d}: transport error during (re)connect\n",
ctrl->cnum);
return;
}
spin_unlock_irqrestore(&ctrl->lock, flags);
/* Otherwise, only proceed if in LIVE state - e.g. on first error */
if (state != NVME_CTRL_LIVE)
if (ctrl->ctrl.state != NVME_CTRL_LIVE)
return;
dev_warn(ctrl->ctrl.device,
@ -3180,16 +3173,12 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
else
ret = nvme_fc_recreate_io_queues(ctrl);
}
spin_lock_irqsave(&ctrl->lock, flags);
if (!ret && test_bit(ASSOC_FAILED, &ctrl->flags))
ret = -EIO;
if (ret) {
spin_unlock_irqrestore(&ctrl->lock, flags);
if (ret)
goto out_term_aen_ops;
}
changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE);
spin_unlock_irqrestore(&ctrl->lock, flags);
ctrl->ctrl.nr_reconnects = 0;