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
This commit is contained in:
parent
fbb4e16a3b
commit
3971dcfa4b
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user