Skip to content

Commit

Permalink
vmmon: fix HostIF_SetFastClockRate() not to use force_sig()
Browse files Browse the repository at this point in the history
Commit 3cf5d076fb4d ("signal: Remove task parameter from force_sig") in
v5.3-rc1 drops second argument of force_sig(); before that, all callers
which passed something else than current task as second argument were
fixed, mostly to use send_sig() instead.

The situation in HostIF_SetFastClockRate() is the same as e.g. in bpfilter
call fixed by commit 1dfd1711de29 ("signal/bpfilter: Fix bpfilter_kernl to
use send_sig not force_sig"): locking in force_sig_info() cannot handle
task exiting and using force_sig() for SIGKILL is pointless anyway as this
signal cannot be blocked.

As send_sig() is present with unchanged signature since the pre-git era, we
can use send_sig() unconditionally, regardless of kernel version.
  • Loading branch information
mkubecek committed Jul 9, 2019
1 parent 06587f7 commit 98008ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vmmon-only/linux/hostif.c
Expand Up @@ -3403,7 +3403,7 @@ HostIF_SetFastClockRate(unsigned int rate) // IN: Frequency in Hz.
}
} else {
if (linuxState.fastClockThread) {
force_sig(SIGKILL, linuxState.fastClockThread);
send_sig(SIGKILL, linuxState.fastClockThread, 1);
kthread_stop(linuxState.fastClockThread);

linuxState.fastClockThread = NULL;
Expand Down

0 comments on commit 98008ff

Please sign in to comment.