kpatch: also unload a loaded, but no longer enabled kernel live patch#1270
Merged
joe-lawrence merged 1 commit intodynup:masterfrom May 19, 2022
Merged
kpatch: also unload a loaded, but no longer enabled kernel live patch#1270joe-lawrence merged 1 commit intodynup:masterfrom
joe-lawrence merged 1 commit intodynup:masterfrom
Conversation
Contributor
|
Hi @rikvanriel , the change looks good, thanks! |
joe-lawrence
approved these changes
May 18, 2022
jpoimboe
reviewed
May 18, 2022
Currently "kpatch force unload <klp_some_version>" will fail to unload an old kernel live patch module that is no longer seeing any use, when the "enabled" file for that module is no longer present. Check for the presence of such modules by checking /sys/module, and return success from disable_patch() for a module that is already disabled. This allows "kpatch force unload <klp_some_version>" to succeed for already disabled modules. Signed-off-by: Rik van Riel <[email protected]>
jpoimboe
approved these changes
May 18, 2022
Contributor
|
Btw, "force unload" is a RHEL-specific behavior. Would you expect this fix to land on any particular elX release? Otherwise, we generally rebase the utility on the next minor rhel. |
Contributor
Author
|
Next minor RHEL should be fine. I already have another workaround for this issue too, just thought it would be worth fixing here, too :) |
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.
Currently "kpatch force unload <klp_some_version>" will fail to unload
an old kernel live patch module that is no longer seeing any use, when
the "enabled" file for that module is no longer present.
Check for the presence of such modules by checking /sys/module, and
return success from disable_patch() for a module that is already
disabled.
This allows "kpatch force unload <klp_some_version>" to succeed for
already disabled modules.
Signed-off-by: Rik van Riel [email protected]