Skip to content

nvme: fix negative errno passed to libnvme_strerror in get_register_properties - #3728

Merged
igaw merged 1 commit into
linux-nvme:masterfrom
bellis-ibm:fix/cid-561360-negative-errno-libnvme-strerror
Aug 5, 2026
Merged

nvme: fix negative errno passed to libnvme_strerror in get_register_properties#3728
igaw merged 1 commit into
linux-nvme:masterfrom
bellis-ibm:fix/cid-561360-negative-errno-libnvme-strerror

Conversation

@bellis-ibm

Copy link
Copy Markdown
Contributor

libnvme_exec_admin_passthru() can return a negative errno value.
Passing that negative value directly to libnvme_strerror(), which
expects a non-negative code, produces an incorrect error string.
Negate err before passing it to libnvme_strerror() to produce the
correct human-readable error string.

Signed-off-by: Brooke Ellis Brooke.Ellis@ibm.com

…roperties

libnvme_exec_admin_passthru() can return a negative errno value.
Passing that negative value directly to libnvme_strerror(), which
expects a non-negative code, produces an incorrect error string.
Negate err before passing it to libnvme_strerror() to produce the
correct human-readable error string.

Signed-off-by: Brooke Ellis <Brooke.Ellis@ibm.com>
@igaw
igaw merged commit 439aca2 into linux-nvme:master Aug 5, 2026
31 of 32 checks passed
@igaw

igaw commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

@bellis-ibm
bellis-ibm deleted the fix/cid-561360-negative-errno-libnvme-strerror branch August 6, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants