Source-Changes-HG archive

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

[src/netbsd-6-0]: src/sys/kern Pull up following revision(s) (requested by ma...



details:   https://anonhg.NetBSD.org/src/rev/e5812a6481df
branches:  netbsd-6-0
changeset: 774935:e5812a6481df
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Apr 21 10:00:35 2014 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #1048):
        sys/kern/kern_exec.c: revision 1.403
'error' is not set on failure. This is a true bug: everything is freed
and unlocked while zero is returned. Since there's no error, execve_runproc()
will get called and will try to use those freed things.

diffstat:

 sys/kern/kern_exec.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 7fc4fab17fe5 -r e5812a6481df sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c      Wed Apr 16 05:48:40 2014 +0000
+++ b/sys/kern/kern_exec.c      Mon Apr 21 10:00:35 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exec.c,v 1.339.2.5.4.2 2014/02/03 11:56:20 sborrill Exp $ */
+/*     $NetBSD: kern_exec.c,v 1.339.2.5.4.3 2014/04/21 10:00:35 bouyer Exp $   */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.5.4.2 2014/02/03 11:56:20 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.5.4.3 2014/04/21 10:00:35 bouyer Exp $");
 
 #include "opt_exec.h"
 #include "opt_ktrace.h"
@@ -820,6 +820,7 @@
        if (len > data->ed_pack.ep_ssize) {
                /* in effect, compare to initial limit */
                DPRINTF(("%s: stack limit exceeded %zu\n", __func__, len));
+               error = ENOMEM;
                goto bad;
        }
        /* adjust "active stack depth" for process VSZ */



Home | Main Index | Thread Index | Old Index