diff --git a/kernel/signal.c b/kernel/signal.c index 45b4c1ffe14ef4..34a1628ee635a1 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1401,6 +1401,13 @@ static int kill_something_info(int sig, struct siginfo *info, pid_t pid) return ret; } + /* + * -INT_MIN is undefined, it need to exclude following case to + * avoid the UBSAN detection. + */ + if (pid == INT_MIN) + return -ESRCH; + read_lock(&tasklist_lock); if (pid != -1) { ret = __kill_pgrp_info(sig, info,