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.
Commit 1b86c7c ("virt: make virtualization enum a named type") made the conversion from
if (!r)
toif (v != VIRTUALIZATION_NONE)
.However, the initial test was meaning "if r is null", IOW "if r IS
VIRTUALIZATION_NONE
).The test is wrong and this can lead to false detection of the container environment (when calling
systemctl exit
).For example, https://gitlab.freedesktop.org/whot/libevdev/-/jobs/34207974 is calling
systemctl exit 0
, and systemd terminates with the exit code130
.Fixing that typo makes
systemctl exit 0
returns0
.Fixes: 1b86c7c.
This was detected in Fedora 37. Fedora 36 was fine as it is relying on systemd v250 which doesn't expose the bug.
Cc: @whot