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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'block-6.1-2022-12-02' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:
"Just a small NVMe merge for this week, fixing protection of the name
space list, and a missing clear of a reserved field when unused"

* tag 'block-6.1-2022-12-02' of git://git.kernel.dk/linux:
nvme: fix SRCU protection of nvme_ns_head list
nvme-pci: clear the prp2 field when not used

+6 -1
+1 -1
drivers/nvme/host/core.c
··· 4304 4304 mutex_unlock(&ns->ctrl->subsys->lock); 4305 4305 4306 4306 /* guarantee not available in head->list */ 4307 - synchronize_rcu(); 4307 + synchronize_srcu(&ns->head->srcu); 4308 4308 4309 4309 if (!nvme_ns_head_multipath(ns->head)) 4310 4310 nvme_cdev_del(&ns->cdev, &ns->cdev_device);
+3
drivers/nvme/host/multipath.c
··· 174 174 struct nvme_ns_head *head = ns->head; 175 175 sector_t capacity = get_capacity(head->disk); 176 176 int node; 177 + int srcu_idx; 177 178 179 + srcu_idx = srcu_read_lock(&head->srcu); 178 180 list_for_each_entry_rcu(ns, &head->list, siblings) { 179 181 if (capacity != get_capacity(ns->disk)) 180 182 clear_bit(NVME_NS_READY, &ns->flags); 181 183 } 184 + srcu_read_unlock(&head->srcu, srcu_idx); 182 185 183 186 for_each_node(node) 184 187 rcu_assign_pointer(head->current_path[node], NULL);
+2
drivers/nvme/host/pci.c
··· 797 797 cmnd->dptr.prp1 = cpu_to_le64(iod->first_dma); 798 798 if (bv->bv_len > first_prp_len) 799 799 cmnd->dptr.prp2 = cpu_to_le64(iod->first_dma + first_prp_len); 800 + else 801 + cmnd->dptr.prp2 = 0; 800 802 return BLK_STS_OK; 801 803 } 802 804