Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Apr 2015 23:56:39 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r281094 - head/sys/kern
Message-ID:  <201504042356.t34Nudx7045980@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Apr  4 23:56:38 2015
New Revision: 281094
URL: https://svnweb.freebsd.org/changeset/base/281094

Log:
  Restore proper error from oshmctl(2), used by COMPAT_43, when the
  segment cannot be found.  Broken by r280323.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	3 days

Modified:
  head/sys/kern/sysv_shm.c

Modified: head/sys/kern/sysv_shm.c
==============================================================================
--- head/sys/kern/sysv_shm.c	Sat Apr  4 23:10:13 2015	(r281093)
+++ head/sys/kern/sysv_shm.c	Sat Apr  4 23:56:38 2015	(r281094)
@@ -965,7 +965,7 @@ oshmctl(struct thread *td, struct oshmct
 	shmseg = shm_find_segment(uap->shmid, true);
 	if (shmseg == NULL) {
 		SYSVSHM_UNLOCK();
-		return (error);
+		return (EINVAL);
 	}
 	switch (uap->cmd) {
 	case IPC_STAT:



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