Module Name: src
Committed By: maxv
Date: Sun Jul 6 07:41:41 UTC 2014
Modified Files:
src/sys/kern: exec_elf.c
Log Message:
Check .evs_used==0 instead of .evs_cmds==NULL. evs_cmds would not be NULL if
another _makecmds() had allocated and deallocated VMCMDs (not the case
currently).
To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/kern/exec_elf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.67 src/sys/kern/exec_elf.c:1.68
--- src/sys/kern/exec_elf.c:1.67 Wed Jun 25 17:10:39 2014
+++ src/sys/kern/exec_elf.c Sun Jul 6 07:41:41 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.c,v 1.67 2014/06/25 17:10:39 christos Exp $ */
+/* $NetBSD: exec_elf.c,v 1.68 2014/07/06 07:41:41 maxv Exp $ */
/*-
* Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.67 2014/06/25 17:10:39 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.68 2014/07/06 07:41:41 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -789,7 +789,7 @@ exec_elf_makecmds(struct lwp *l, struct
}
}
- if (epp->ep_vmcmds.evs_cmds == NULL) {
+ if (epp->ep_vmcmds.evs_used == 0) {
/* No VMCMD; there was no PT_LOAD section, or those
* sections were empty */
error = ENOEXEC;