linux/drivers/nvme/host
Guixin Liu df74eaad00 nvme-pci: return error when parsing a quirk string fails
quirks_param_set() reuses 'err', which param_set_copystring() left as 0,
as the return value of the whole function. When nvme_parse_quirk_entry()
fails to parse a field, the code jumps to out_free_qlist and returns that
stale 0, so a malformed quirks= parameter is silently accepted as valid.

Set err to -EINVAL before jumping out on a parse failure.

Fixes: 7bb8c40f5a ("nvme: add support for dynamic quirk configuration via module parameter")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
History 2026-07-29 08:08:01 -07:00
..
apple.c nvme-apple: Remove redundant dev_err_probe() 2026-07-28 14:06:02 -07:00
auth.c nvme-auth: use crypto_memneq for DH-HMAC-CHAP response comparison 2026-07-06 11:38:44 -07:00
constants.c nvme: fix typo in status code constant for self-test in progress 2025-07-17 13:38:07 +02:00
core.c nvme: add context annotations for nvme_subsystems_lock 2026-07-28 10:37:37 -07:00
fabrics.c nvme: add context annotations in fabric.c 2026-07-28 10:37:40 -07:00
fabrics.h nvme: remove virtual boundary for sgl capable devices 2025-11-06 18:11:58 -07:00
fault_inject.c fault-inject: improve build for CONFIG_FAULT_INJECTION=n 2024-09-01 20:43:33 -07:00
fc.c nvme-fc: unmap cmd_iu DMA on rsp_iu mapping failure in init_request 2026-07-29 08:08:01 -07:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ioctl.c nvme/ioctl: check SUBMIT_IO with nvme_cmd_allowed() 2026-07-28 14:07:33 -07:00
Kconfig block-6.16-20250606 2025-06-06 13:12:50 -07:00
Makefile nvme: enable context analysis support for nvme host driver 2026-07-28 10:37:57 -07:00
multipath.c nvme: add context annotations for nvme_ctrl::ana_lock 2026-07-28 10:37:34 -07:00
nvme.h nvme: add context annotations for nvme_subsystems_lock 2026-07-28 10:37:37 -07:00
pci.c nvme-pci: return error when parsing a quirk string fails 2026-07-29 08:08:01 -07:00
pr.c nvme: fix memory allocation in nvme_pr_read_keys() 2026-03-04 06:53:41 -08:00
rdma.c nvme: fix context analysis warning in rdma.c 2026-07-28 10:37:49 -07:00
sysfs.c nvme: handle positive error codes in nuse_show() 2026-07-06 11:38:07 -07:00
tcp.c nvme: fix context analysis warning in tcp.c 2026-07-28 10:37:55 -07:00
trace.c nvme: parse reservation commands's action and rtype to string 2024-11-13 08:51:24 -08:00
trace.h nvme: fix async event trace event 2023-04-13 08:59:04 +02:00
zns.c nvme: zns: include zone index in invalid zone type error 2026-07-06 11:15:27 -07:00