kpatch/kpatch
Evgenii Shatokhin 23f4e7554d If kpatch fails to disable a patch, retry a few times
This is similar to how loading of the patches works now. Needed mostly
for the "old" kpatch, i.e. for the kernels that do not support livepatch.

If the patched functions are currently used, loading of the patch fails
with "Device or resource busy" error. kpatch script then retries the
operation several times.

In some cases, it could be convenient to do the same thing when
unloading or simply disabling the patches. One of the use cases is when
it is needed to replace a loaded cumulative patch with its previous
version, esp. if the patches have patch/unpatch hooks. It is often more
reliable to disable the loaded patches first and then load the new
patch. Disable operation may fail due to activeness safety check - so
let us retry it a few times.

v2:
As suggested in PR #790, disable_patch() no longer returns a value but
rather calls die() at the point of error.

Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
2018-02-28 14:44:00 +03:00
..
Makefile add uninstall target 2014-03-20 11:29:25 -05:00
kpatch If kpatch fails to disable a patch, retry a few times 2018-02-28 14:44:00 +03:00