kpatch: Inform user when signal subcommand is unnecessary

From Linux-5.1 onward, the sysfs interface to send signals to
processes stalling livepatch transitions is replace by a peridical
signal sent by the kernel.

On such systems, the kpatch signal subcommand does nothing. Just
let the user know they don't need to worry about it.

Fixes: #1151
Signed-off-by: Julien Thierry <jthierry@redhat.com>
This commit is contained in:
Julien Thierry 2021-01-14 09:47:50 +01:00
parent 0ba3f5aaab
commit b470e5091d
2 changed files with 7 additions and 1 deletions

View File

@ -237,6 +237,9 @@ signal_stalled_processes() {
if [[ -e "/sys/kernel/livepatch/$module/signal" ]] ; then
echo "signaling stalled process(es):"
echo 1 > "/sys/kernel/livepatch/$module/signal"
else
warn "Livepatch process signaling is performed automatically on your system."
warn "Skipping manual process signaling."
fi
}

View File

@ -36,7 +36,10 @@ list
list installed patch modules
signal
signal/poke any process stalling the current patch transition
signal/poke any process stalling the current patch transition.
This is only useful on systems that have the sysfs livepatch signal interface.
On other systems, the signaling should be done automatically by the OS and
this subcommand is a no-op.
version
display the kpatch version