Skip to content

Commit 0473976

Browse files
committed
Merge branch 'nvme-5.4-rc7' of git://git.infradead.org/nvme into for-linus
Pull NVMe fixes from Keith: "We have a few late nvme fixes for a couple device removal kernel crashes, and a compat fix for a new ioctl introduced during this merge window." * 'nvme-5.4-rc7' of git://git.infradead.org/nvme: nvme: change nvme_passthru_cmd64 to explicitly mark rsvd nvme-multipath: fix crash in nvme_mpath_clear_ctrl_paths nvme-rdma: fix a segmentation fault during module unload
2 parents 41591a5 + 0d6eeb1 commit 0473976

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎drivers/nvme/host/multipath.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,11 @@ void nvme_mpath_clear_ctrl_paths(struct nvme_ctrl *ctrl)
158158
struct nvme_ns *ns;
159159

160160
mutex_lock(&ctrl->scan_lock);
161+
down_read(&ctrl->namespaces_rwsem);
161162
list_for_each_entry(ns, &ctrl->namespaces, list)
162163
if (nvme_mpath_clear_current_path(ns))
163164
kblockd_schedule_work(&ns->head->requeue_work);
165+
up_read(&ctrl->namespaces_rwsem);
164166
mutex_unlock(&ctrl->scan_lock);
165167
}
166168

‎drivers/nvme/host/rdma.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,8 +2133,16 @@ static int __init nvme_rdma_init_module(void)
21332133

21342134
static void __exit nvme_rdma_cleanup_module(void)
21352135
{
2136+
struct nvme_rdma_ctrl *ctrl;
2137+
21362138
nvmf_unregister_transport(&nvme_rdma_transport);
21372139
ib_unregister_client(&nvme_rdma_ib_client);
2140+
2141+
mutex_lock(&nvme_rdma_ctrl_mutex);
2142+
list_for_each_entry(ctrl, &nvme_rdma_ctrl_list, list)
2143+
nvme_delete_ctrl(&ctrl->ctrl);
2144+
mutex_unlock(&nvme_rdma_ctrl_mutex);
2145+
flush_workqueue(nvme_delete_wq);
21382146
}
21392147

21402148
module_init(nvme_rdma_init_module);

‎include/uapi/linux/nvme_ioctl.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ struct nvme_passthru_cmd64 {
6363
__u32 cdw14;
6464
__u32 cdw15;
6565
__u32 timeout_ms;
66+
__u32 rsvd2;
6667
__u64 result;
6768
};
6869

0 commit comments

Comments
 (0)