Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kpatch: also unload a loaded, but no longer enabled kernel live patch #1270

Merged
merged 1 commit into from
May 19, 2022

Conversation

rikvanriel
Copy link
Contributor

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 riel@surriel.com

@joe-lawrence
Copy link
Contributor

Hi @rikvanriel , the change looks good, thanks!

kpatch/kpatch Outdated Show resolved Hide resolved
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 <riel@surriel.com>
@joe-lawrence
Copy link
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.

@rikvanriel
Copy link
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 :)

@joe-lawrence joe-lawrence merged commit 4d485dd into dynup:master May 19, 2022
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.

3 participants