Merge tag 'rtc-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
[sfrench/cifs-2.6.git] / kernel / signal.c
index 48a59eefd8adb8ffeb2be4a7b7307eba18950155..caed9133ae52733aa96baf74cb4ef3c344832125 100644 (file)
@@ -1402,6 +1402,10 @@ static int kill_something_info(int sig, struct siginfo *info, pid_t pid)
                return ret;
        }
 
+       /* -INT_MIN is undefined.  Exclude this case to avoid a UBSAN warning */
+       if (pid == INT_MIN)
+               return -ESRCH;
+
        read_lock(&tasklist_lock);
        if (pid != -1) {
                ret = __kill_pgrp_info(sig, info,