Repository navigation
nvme-discoverd: fix a crash on a failed discovery log read - #4491
Open
martin-belanger wants to merge 2 commits into
Open
martin-belanger wants to merge 2 commits into
martin-belanger wants to merge 2 commits into
Conversation
added 2 commits
December 4, 2026 06:20
libnvmf_get_discovery_log() returns the positive NVMe status when the controller answers a Get Log Page command with an error, as libnvme_get_log() does. Its comment said it returns only negative error codes. Signed-off-by: Martin Belanger <martin.belanger@dell.com>
libnvmf_get_discovery_log() returns a negative errno or, when the controller answers with an error, the positive NVMe status, for example a host path error from a controller that is not live. nvme-discoverd took a positive value for success and processed a log page it never got: it crashed. Convert the status to an errno, so the read counts as failed and the DLP is read again at the next event. Fixes: 0ec54f7 ("discoverd: read discovery logs without blocking") Signed-off-by: Martin Belanger <martin.belanger@dell.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nvme-discoverd crashed when a Discovery Log Page read failed with an
NVMe status, e.g. a host path error from a DC that is not live yet.
libnvmf_get_discovery_log() returns that status as a positive value,
and nvme-discoverd treated it as success with no log page.
the DLP is read again at the next event. New handover test.
Affects 3.2 and 3.3.