diff --git a/kernel/exit.c b/kernel/exit.c index 608c9775a37bc9022759f60e54b1dfcc0c6522d7..c5548faa9f377c5bf01f4a4db8e3020448565469 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1639,6 +1639,10 @@ long kernel_wait4(pid_t upid, int __user *stat_addr, int options, __WNOTHREAD|__WCLONE|__WALL)) return -EINVAL; + /* -INT_MIN is not defined */ + if (upid == INT_MIN) + return -ESRCH; + if (upid == -1) type = PIDTYPE_MAX; else if (upid < 0) {