summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2016-01-09 15:33:48 +0000
committerdchagin <dchagin@FreeBSD.org>2016-01-09 15:33:48 +0000
commit9ef9a018392248ab5f911960b69a3af51ad14c4a (patch)
tree0e4fcb2460956c8259858a6460c8f21876330dc8
parente327d1c9cc9cb36f6546e65f04e005f08bd0dfab (diff)
downloadFreeBSD-src-9ef9a018392248ab5f911960b69a3af51ad14c4a.zip
FreeBSD-src-9ef9a018392248ab5f911960b69a3af51ad14c4a.tar.gz
MFC r283398:
Sched_rr_get_interval returns EINVAL in case when the invalid pid specified. This silence the ltp tests.
-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