Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/kern Pull up following revision(s) (requested by kami...



details:   https://anonhg.NetBSD.org/src/rev/83540113e8ea
branches:  netbsd-8
changeset: 434915:83540113e8ea
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Apr 16 13:31:33 2018 +0000

description:
Pull up following revision(s) (requested by kamil in ticket #758):

        sys/kern/kern_proc.c: revision 1.212

Don't set errno ESRCH for empty result of KINFO_PROC[2]

Restore the previous behavior as it's prefered.
This new behavior was introduced in 1.210.
Code should check for length of the result.

Requested by <mlelstv>

diffstat:

 sys/kern/kern_proc.c |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (29 lines):

diff -r 09cf1e2bcfdb -r 83540113e8ea sys/kern/kern_proc.c
--- a/sys/kern/kern_proc.c      Sat Apr 14 11:28:12 2018 +0000
+++ b/sys/kern/kern_proc.c      Mon Apr 16 13:31:33 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_proc.c,v 1.206.6.3 2018/04/12 13:42:48 martin Exp $       */
+/*     $NetBSD: kern_proc.c,v 1.206.6.4 2018/04/16 13:31:33 martin Exp $       */
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.206.6.3 2018/04/12 13:42:48 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.206.6.4 2018/04/16 13:31:33 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kstack.h"
@@ -1834,10 +1834,6 @@
        mutex_exit(proc_lock);
 
        if (where != NULL) {
-               if (needed == 0) {
-                       error = ESRCH;
-                       goto out;
-               }
                *oldlenp = dp - where;
                if (needed > *oldlenp) {
                        error = ENOMEM;



Home | Main Index | Thread Index | Old Index