svn commit: r293507 - stable/10/sys/compat/linux

Dmitry Chagin dchagin at FreeBSD.org
Sat Jan 9 15:33:49 UTC 2016


Author: dchagin
Date: Sat Jan  9 15:33:48 2016
New Revision: 293507
URL: https://svnweb.freebsd.org/changeset/base/293507

Log:
  MFC r283398:
  
  Sched_rr_get_interval returns EINVAL in case when the invalid pid
  specified. This silence the ltp tests.

Modified:
  stable/10/sys/compat/linux/linux_misc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_misc.c
==============================================================================
--- stable/10/sys/compat/linux/linux_misc.c	Sat Jan  9 15:32:33 2016	(r293506)
+++ stable/10/sys/compat/linux/linux_misc.c	Sat Jan  9 15:33:48 2016	(r293507)
@@ -2041,6 +2041,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