Skip to content

Commit 1dfd171

Browse files
committed
signal/bpfilter: Fix bpfilter_kernl to use send_sig not force_sig
The locking in force_sig_info is not prepared to deal with a task that exits or execs (as sighand may change). As force_sig is only built to handle synchronous exceptions. Further the function force_sig_info changes the signal state if the signal is ignored, or blocked or if SIGNAL_UNKILLABLE will prevent the delivery of the signal. The signal SIGKILL can not be ignored and can not be blocked and SIGNAL_UNKILLABLE won't prevent it from being delivered. So using force_sig rather than send_sig for SIGKILL is pointless. Because it won't impact the sending of the signal and and because using force_sig is wrong, replace force_sig with send_sig. Cc: Alexei Starovoitov <ast@kernel.org> Cc: David S. Miller <davem@davemloft.net> Fixes: d2ba09c ("net: add skeleton of bpfilter kernel module") Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
1 parent fee1099 commit 1dfd171

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/bpfilter/bpfilter_kern.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static void shutdown_umh(void)
2222

2323
tsk = get_pid_task(find_vpid(bpfilter_ops.info.pid), PIDTYPE_PID);
2424
if (tsk) {
25-
force_sig(SIGKILL, tsk);
25+
send_sig(SIGKILL, tsk, 1);
2626
put_task_struct(tsk);
2727
}
2828
}

0 commit comments

Comments
 (0)