Author: jamie
Date: Mon Apr 25 22:30:10 2016
New Revision: 298597
URL: https://svnweb.freebsd.org/changeset/base/298597

Log:
  Fix the logic in r298585: shm_prison_cansee returns an errno, so is
  the opposite of a boolean.
  
  PR:           48471

Modified:
  head/sys/kern/sysv_shm.c

Modified: head/sys/kern/sysv_shm.c
==============================================================================
--- head/sys/kern/sysv_shm.c    Mon Apr 25 22:25:57 2016        (r298596)
+++ head/sys/kern/sysv_shm.c    Mon Apr 25 22:30:10 2016        (r298597)
@@ -230,7 +230,7 @@ shm_find_segment(struct prison *rpr, int
            (!shm_allow_removed &&
            (shmseg->u.shm_perm.mode & SHMSEG_REMOVED) != 0) ||
            (is_shmid && shmseg->u.shm_perm.seq != IPCID_TO_SEQ(arg)) ||
-           !shm_prison_cansee(rpr, shmseg))
+           shm_prison_cansee(rpr, shmseg) != 0)
                return (NULL);
        return (shmseg);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to