[lkml]   [2020]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 4.19 398/639] signal/bpfilter: Fix bpfilter_kernl to use send_sig not force_sig
    From: Eric W. Biederman <>

    [ Upstream commit 1dfd1711de2952fd1bfeea7152bd1687a4eea771 ]

    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

    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 <>
    Cc: David S. Miller <>
    Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module")
    Signed-off-by: "Eric W. Biederman" <>
    Signed-off-by: Sasha Levin <>
    net/bpfilter/bpfilter_kern.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/net/bpfilter/bpfilter_kern.c b/net/bpfilter/bpfilter_kern.c
    index 94e88f510c5b8..450b257afa84d 100644
    --- a/net/bpfilter/bpfilter_kern.c
    +++ b/net/bpfilter/bpfilter_kern.c
    @@ -25,7 +25,7 @@ static void shutdown_umh(struct umh_info *info)
    tsk = get_pid_task(find_vpid(info->pid), PIDTYPE_PID);
    if (tsk) {
    - force_sig(SIGKILL, tsk);
    + send_sig(SIGKILL, tsk, 1);

     \ /
      Last update: 2020-01-24 12:24    [W:2.098 / U:3.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site