diff options
| author | Guixin Liu <kanie@linux.alibaba.com> | 2026-08-04 10:18:57 +0800 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-08-10 12:25:54 -0700 |
| commit | 79aba4c9403419d822972d2851f2a96a2c0531cf (patch) | |
| tree | 940e8373d170bece97ae986d6890fb7cca0691d7 /tools/perf/scripts/python/parallel-perf.py | |
| parent | bededeaaeff404978a5a8e2a605a6c3017cddd3e (diff) | |
nvmet: fix NULL pointer dereference in nvmet_execute_identify_nslist()
When a host issues an Identify command with CNS 07h (Active Namespace ID
List for a specific I/O Command Set), nvmet_execute_identify_nslist() is
called with match_css set. The command-set filter dereferences req->ns,
but this handler never calls nvmet_req_find_ns(), so req->ns is always
NULL (nvmet_req_init() resets it to NULL). As soon as an enabled
namespace with an NSID greater than the requested value exists,
req->ns->csi dereferences a NULL pointer and oopses.
Besides the crash, the comparison is logically wrong: to filter the list
by command set it must test the command set of the namespace being
iterated, not a single fixed value. Use the loop variable ns->csi.
Fixes: 61c9967cd634 ("nvmet: implement active command set ns list")
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions
