Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 May 2015 15:13:56 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r283398 - head/sys/compat/linux
Message-ID:  <201505241513.t4OFDu5X045367@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505241513.t4OFDu5X045367>