[PATCH 1/3] nvme: add a quirk to disable namespace identifiers
Keith Busch
kbusch at kernel.org
Tue Apr 12 07:16:32 PDT 2022
On Tue, Apr 12, 2022 at 08:11:24AM +0200, Christoph Hellwig wrote:
> @@ -1282,6 +1282,8 @@ static int nvme_process_ns_desc(struct nvme_ctrl *ctrl, struct nvme_ns_ids *ids,
>
> switch (cur->nidt) {
> case NVME_NIDT_EUI64:
> + if (ctrl->quirks & NVME_QUIRK_BOGUS_NID)
> + return NVME_NIDT_EUI64_LEN;
> if (cur->nidl != NVME_NIDT_EUI64_LEN) {
> dev_warn(ctrl->device, "%s %d for NVME_NIDT_EUI64\n",
> warn_str, cur->nidl);
Shouldn't we still verify that cur->nidl is accurate rather than assume the
length? If it is the wrong length, then we have a corrupt descriptor list and
should abort the process.
More information about the Linux-nvme
mailing list