On 02-Jun-2002 kai ouyang wrote:
> Based on the explain of the thread: struct proc *td_proc; /* Associated process. */
>in the struct
> and refer to the CCD code.
> I modify this function as following:
> int raidlookup(path, td, vpp)
> char *path;
> struct thread *td;
> struct vnode **vpp; /* result */
> struct nameidata nd;
> struct vnode *vp;
> struct vattr va;
> struct proc *p;
> int error, flags;
> /* Sanity check the p_fd fields. This is really just a hack */
> p = td->td_proc;
So it dies here?
> Now the system will be crash , when it excutes the "p = td->td_proc".
> the system Information is :
> kernel: type 12 trap, code=0
> Stopped at raidlookup+0x19: movl 0(%eax),%ebx
Hmm, can you get the 'faulting va (virtual address)' error message that it
Add a line to the beginning of the function as a sanity check that does:
KASSERT(td != NULL, "thread is null");
and compile your kernel with invariants and see if it panics with
"thread is null".
John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message