diff options
author | tmm <tmm@FreeBSD.org> | 2004-06-20 17:31:01 +0000 |
---|---|---|
committer | tmm <tmm@FreeBSD.org> | 2004-06-20 17:31:01 +0000 |
commit | 2dca765b97537157da7a9ca3a74a422ad3bdf595 (patch) | |
tree | 4f4aa9f86fd50b5ae4648bc9b9fca4b04d87f134 | |
parent | 5c21bd33720a99e6cf3c62eec27d5d2dc648a7e3 (diff) | |
download | FreeBSD-src-2dca765b97537157da7a9ca3a74a422ad3bdf595.zip FreeBSD-src-2dca765b97537157da7a9ca3a74a422ad3bdf595.tar.gz |
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
-rw-r--r-- | sys/kern/vfs_mount.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 57220ba..c3fc5dc 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); |