From 3971dcfa4b90ddd5045d6c3896f9aa7a1f7fb097 Mon Sep 17 00:00:00 2001 From: Thomas Moestl Date: Sun, 20 Jun 2004 17:31:01 +0000 Subject: [PATCH] Initialize ni_cnd.cn_cred before calling lookup() (this is normally done by namei(), which cannot easily be used here however). This fixes boot time crashes on sparc64 and probably other platforms. Reviewed by: phk --- sys/kern/vfs_mount.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 57220ba12a9..c3fc5dcac9b 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1488,6 +1488,7 @@ getdiskbyname(char *name) UIO_SYSSPACE, cp, curthread); nid.ni_startdir = vroot; nid.ni_pathlen = strlen(cp); + nid.ni_cnd.cn_cred = curthread->td_ucred; nid.ni_cnd.cn_nameptr = cp; error = lookup(&nid);