Merge pull request #1024 from joe-lawrence/remove-signal

kpatch: remove manual signaling logic
This commit is contained in:
Joe Lawrence 2019-08-19 10:50:55 -04:00 committed by GitHub
commit 6f5edcd573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -230,21 +230,8 @@ signal_stalled_processes() {
[[ -z "$module" ]] && return [[ -z "$module" ]] && return
if [[ -e "/sys/kernel/livepatch/$module/signal" ]] ; then if [[ -e "/sys/kernel/livepatch/$module/signal" ]] ; then
echo "signaling stalled process(es):"
echo 1 > "/sys/kernel/livepatch/$module/signal" echo 1 > "/sys/kernel/livepatch/$module/signal"
else
for proc_task in /proc/[0-9]*/task/[0-9]*; do
tid=${proc_task#*/task/}
if is_stalled "$module" "$tid" ; then
if [[ "$tid" -eq "$$" ]] ; then
echo "skipping pid $tid $(cat "$proc_task"/comm 2>/dev/null)"
else
echo "signaling pid $tid $(cat "$proc_task"/comm 2>/dev/null)"
kill -SIGSTOP "$tid"
sleep .1
kill -SIGCONT "$tid"
fi
fi
done
fi fi
} }
@ -263,7 +250,7 @@ wait_for_patch_transition() {
sleep 1s sleep 1s
done done
echo "patch transition has stalled, signaling stalled process(es):" echo "patch transition has stalled!"
signal_stalled_processes signal_stalled_processes
echo "waiting (up to $POST_SIGNAL_WAIT seconds) for patch transition to complete..." echo "waiting (up to $POST_SIGNAL_WAIT seconds) for patch transition to complete..."