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-5.11-2021-01-16' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
"Just an nvme pull request via Christoph:

- don't initialize hwmon for discover controllers (Sagi Grimberg)

- fix iov_iter handling in nvme-tcp (Sagi Grimberg)

- fix a preempt warning in nvme-tcp (Sagi Grimberg)

- fix a possible NULL pointer dereference in nvme (Israel Rukshin)"

* tag 'block-5.11-2021-01-16' of git://git.kernel.dk/linux-block:
nvme: don't intialize hwmon for discovery controllers
nvme-tcp: fix possible data corruption with bio merges
nvme-tcp: Fix warning with CONFIG_DEBUG_PREEMPT
nvmet-rdma: Fix NULL deref when setting pi_enable and traddr INADDR_ANY

+18 -13
+8 -3
drivers/nvme/host/core.c
··· 2856 2856 NULL, 2857 2857 }; 2858 2858 2859 + static inline bool nvme_discovery_ctrl(struct nvme_ctrl *ctrl) 2860 + { 2861 + return ctrl->opts && ctrl->opts->discovery_nqn; 2862 + } 2863 + 2859 2864 static bool nvme_validate_cntlid(struct nvme_subsystem *subsys, 2860 2865 struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) 2861 2866 { ··· 2880 2875 } 2881 2876 2882 2877 if ((id->cmic & NVME_CTRL_CMIC_MULTI_CTRL) || 2883 - (ctrl->opts && ctrl->opts->discovery_nqn)) 2878 + nvme_discovery_ctrl(ctrl)) 2884 2879 continue; 2885 2880 2886 2881 dev_err(ctrl->device, ··· 3149 3144 goto out_free; 3150 3145 } 3151 3146 3152 - if (!ctrl->opts->discovery_nqn && !ctrl->kas) { 3147 + if (!nvme_discovery_ctrl(ctrl) && !ctrl->kas) { 3153 3148 dev_err(ctrl->device, 3154 3149 "keep-alive support is mandatory for fabrics\n"); 3155 3150 ret = -EINVAL; ··· 3189 3184 if (ret < 0) 3190 3185 return ret; 3191 3186 3192 - if (!ctrl->identified) { 3187 + if (!ctrl->identified && !nvme_discovery_ctrl(ctrl)) { 3193 3188 ret = nvme_hwmon_init(ctrl); 3194 3189 if (ret < 0) 3195 3190 return ret;
+2 -2
drivers/nvme/host/tcp.c
··· 201 201 202 202 static inline size_t nvme_tcp_req_cur_length(struct nvme_tcp_request *req) 203 203 { 204 - return min_t(size_t, req->iter.bvec->bv_len - req->iter.iov_offset, 204 + return min_t(size_t, iov_iter_single_seg_count(&req->iter), 205 205 req->pdu_len - req->pdu_sent); 206 206 } 207 207 ··· 286 286 * directly, otherwise queue io_work. Also, only do that if we 287 287 * are on the same cpu, so we don't introduce contention. 288 288 */ 289 - if (queue->io_cpu == smp_processor_id() && 289 + if (queue->io_cpu == __smp_processor_id() && 290 290 sync && empty && mutex_trylock(&queue->send_mutex)) { 291 291 queue->more_requests = !last; 292 292 nvme_tcp_send_all(queue);
+8 -8
drivers/nvme/target/rdma.c
··· 1220 1220 } 1221 1221 ndev->inline_data_size = nport->inline_data_size; 1222 1222 ndev->inline_page_count = inline_page_count; 1223 + 1224 + if (nport->pi_enable && !(cm_id->device->attrs.device_cap_flags & 1225 + IB_DEVICE_INTEGRITY_HANDOVER)) { 1226 + pr_warn("T10-PI is not supported by device %s. Disabling it\n", 1227 + cm_id->device->name); 1228 + nport->pi_enable = false; 1229 + } 1230 + 1223 1231 ndev->device = cm_id->device; 1224 1232 kref_init(&ndev->ref); 1225 1233 ··· 1860 1852 ret = rdma_listen(cm_id, 128); 1861 1853 if (ret) { 1862 1854 pr_err("listening to %pISpcs failed (%d)\n", addr, ret); 1863 - goto out_destroy_id; 1864 - } 1865 - 1866 - if (port->nport->pi_enable && 1867 - !(cm_id->device->attrs.device_cap_flags & 1868 - IB_DEVICE_INTEGRITY_HANDOVER)) { 1869 - pr_err("T10-PI is not supported for %pISpcs\n", addr); 1870 - ret = -EINVAL; 1871 1855 goto out_destroy_id; 1872 1856 } 1873 1857