Module Name: src
Committed By: rmind
Date: Fri Apr 29 22:57:54 UTC 2011
Modified Files:
src/sys/kern: kern_core.c
Log Message:
Small comment improvement.
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/kern/kern_core.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/kern_core.c
diff -u src/sys/kern/kern_core.c:1.17 src/sys/kern/kern_core.c:1.18
--- src/sys/kern/kern_core.c:1.17 Fri Nov 19 06:44:42 2010
+++ src/sys/kern/kern_core.c Fri Apr 29 22:57:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_core.c,v 1.17 2010/11/19 06:44:42 dholland Exp $ */
+/* $NetBSD: kern_core.c,v 1.18 2011/04/29 22:57:54 rmind Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.17 2010/11/19 06:44:42 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.18 2011/04/29 22:57:54 rmind Exp $");
#include <sys/param.h>
#include <sys/vnode.h>
@@ -164,17 +164,20 @@
pattern = security_setidcore_path;
}
- /* It is (just) possible for p_limit and pl_corename to change */
+ /* Lock, as p_limit and pl_corename might change. */
lim = p->p_limit;
mutex_enter(&lim->pl_lock);
- if (pattern == NULL)
+ if (pattern == NULL) {
pattern = lim->pl_corename;
+ }
error = coredump_buildname(p, name, pattern, MAXPATHLEN);
mutex_exit(&lim->pl_lock);
+
mutex_exit(p->p_lock);
mutex_exit(proc_lock);
- if (error)
+ if (error) {
goto done;
+ }
pb = pathbuf_create(name);
if (pb == NULL) {