summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_misc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index f54018d..17a153b 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -2041,6 +2041,13 @@ linux_sched_rr_get_interval(struct thread *td,
struct thread *tdt;
int error;
+ /*
+ * According to man in case the invalid pid specified
+ * EINVAL should be returned.
+ */
+ if (uap->pid < 0)
+ return (EINVAL);
+
tdt = linux_tdfind(td, uap->pid, -1);
if (tdt == NULL)
return (ESRCH);
OpenPOWER on IntegriCloud