Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'block-6.18-20251120' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux

Pull block fixes from Jens Axboe:
"NVMe pull request via Keith:

- Admin queue use-after-free fix (Keith)

- Target authentication fix (Alistar)

- Multipath lockdeup fix (Shin'ichiro)

- FC transport teardown fixes (Ewan)"

* tag 'block-6.18-20251120' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux:
nvme: nvme-fc: Ensure ->ioerr_work is cancelled in nvme_fc_delete_ctrl()
nvme: nvme-fc: move tagset removal to nvme_fc_delete_ctrl()
nvme-multipath: fix lockdep WARN due to partition scan work
nvmet-auth: update sc_c in target host hash calculation
nvme: fix admin request_queue lifetime

+15 -11
+2 -1
drivers/nvme/host/core.c
··· 4901 4901 */ 4902 4902 nvme_stop_keep_alive(ctrl); 4903 4903 blk_mq_destroy_queue(ctrl->admin_q); 4904 - blk_put_queue(ctrl->admin_q); 4905 4904 if (ctrl->ops->flags & NVME_F_FABRICS) { 4906 4905 blk_mq_destroy_queue(ctrl->fabrics_q); 4907 4906 blk_put_queue(ctrl->fabrics_q); ··· 5044 5045 container_of(dev, struct nvme_ctrl, ctrl_device); 5045 5046 struct nvme_subsystem *subsys = ctrl->subsys; 5046 5047 5048 + if (ctrl->admin_q) 5049 + blk_put_queue(ctrl->admin_q); 5047 5050 if (!subsys || ctrl->instance != subsys->instance) 5048 5051 ida_free(&nvme_instance_ida, ctrl->instance); 5049 5052 nvme_free_cels(ctrl);
+8 -7
drivers/nvme/host/fc.c
··· 2355 2355 container_of(ref, struct nvme_fc_ctrl, ref); 2356 2356 unsigned long flags; 2357 2357 2358 - if (ctrl->ctrl.tagset) 2359 - nvme_remove_io_tag_set(&ctrl->ctrl); 2360 - 2361 2358 /* remove from rport list */ 2362 2359 spin_lock_irqsave(&ctrl->rport->lock, flags); 2363 2360 list_del(&ctrl->ctrl_list); 2364 2361 spin_unlock_irqrestore(&ctrl->rport->lock, flags); 2365 - 2366 - nvme_unquiesce_admin_queue(&ctrl->ctrl); 2367 - nvme_remove_admin_tag_set(&ctrl->ctrl); 2368 2362 2369 2363 kfree(ctrl->queues); 2370 2364 ··· 3253 3259 { 3254 3260 struct nvme_fc_ctrl *ctrl = to_fc_ctrl(nctrl); 3255 3261 3256 - cancel_work_sync(&ctrl->ioerr_work); 3257 3262 cancel_delayed_work_sync(&ctrl->connect_work); 3263 + 3258 3264 /* 3259 3265 * kill the association on the link side. this will block 3260 3266 * waiting for io to terminate 3261 3267 */ 3262 3268 nvme_fc_delete_association(ctrl); 3269 + cancel_work_sync(&ctrl->ioerr_work); 3270 + 3271 + if (ctrl->ctrl.tagset) 3272 + nvme_remove_io_tag_set(&ctrl->ctrl); 3273 + 3274 + nvme_unquiesce_admin_queue(&ctrl->ctrl); 3275 + nvme_remove_admin_tag_set(&ctrl->ctrl); 3263 3276 } 3264 3277 3265 3278 static void
+1 -1
drivers/nvme/host/multipath.c
··· 793 793 return; 794 794 } 795 795 nvme_add_ns_head_cdev(head); 796 - kblockd_schedule_work(&head->partition_scan_work); 796 + queue_work(nvme_wq, &head->partition_scan_work); 797 797 } 798 798 799 799 nvme_mpath_add_sysfs_link(ns->head);
+2 -2
drivers/nvme/target/auth.c
··· 298 298 const char *hash_name; 299 299 u8 *challenge = req->sq->dhchap_c1; 300 300 struct nvme_dhchap_key *transformed_key; 301 - u8 buf[4], sc_c = ctrl->concat ? 1 : 0; 301 + u8 buf[4]; 302 302 int ret; 303 303 304 304 hash_name = nvme_auth_hmac_name(ctrl->shash_id); ··· 367 367 ret = crypto_shash_update(shash, buf, 2); 368 368 if (ret) 369 369 goto out; 370 - *buf = sc_c; 370 + *buf = req->sq->sc_c; 371 371 ret = crypto_shash_update(shash, buf, 1); 372 372 if (ret) 373 373 goto out;
+1
drivers/nvme/target/fabrics-cmd-auth.c
··· 43 43 data->auth_protocol[0].dhchap.halen, 44 44 data->auth_protocol[0].dhchap.dhlen); 45 45 req->sq->dhchap_tid = le16_to_cpu(data->t_id); 46 + req->sq->sc_c = data->sc_c; 46 47 if (data->sc_c != NVME_AUTH_SECP_NOSC) { 47 48 if (!IS_ENABLED(CONFIG_NVME_TARGET_TCP_TLS)) 48 49 return NVME_AUTH_DHCHAP_FAILURE_CONCAT_MISMATCH;
+1
drivers/nvme/target/nvmet.h
··· 159 159 bool authenticated; 160 160 struct delayed_work auth_expired_work; 161 161 u16 dhchap_tid; 162 + u8 sc_c; 162 163 u8 dhchap_status; 163 164 u8 dhchap_step; 164 165 u8 *dhchap_c1;