svn commit: r283398 - head/sys/compat/linux

Dmitry Chagin dchagin at FreeBSD.org
Sun May 24 15:13:57 UTC 2015


Author: dchagin
Date: Sun May 24 15:13:56 2015
New Revision: 283398
URL: https://svnweb.freebsd.org/changeset/base/283398

Log:
  Sched_rr_get_interval returns EINVAL in case when the invalid pid
  specified. This silence the ltp tests.
  
  Differential Revision:	https://reviews.freebsd.org/D1048
  Reviewed by:	trasz

Modified:
  head/sys/compat/linux/linux_misc.c

Modified: head/sys/compat/linux/linux_misc.c
==============================================================================
--- head/sys/compat/linux/linux_misc.c	Sun May 24 15:12:38 2015	(r283397)
+++ head/sys/compat/linux/linux_misc.c	Sun May 24 15:13:56 2015	(r283398)
@@ -2043,6 +2043,13 @@ linux_sched_rr_get_interval(struct threa
 	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);


More information about the svn-src-all mailing list