Subject: kern/36197: "panic: vput: null vp" after recent emul/namei changes
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 04/23/2007 02:05:00
>Number:         36197
>Category:       kern
>Synopsis:       "panic: vput: null vp" after recent emul/namei changes
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 23 02:05:00 +0000 2007
>Originator:     YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release:        NetBSD 4.99.18
>Organization:
	
>Environment:
>Description:
	after recent emul/namei changes, "/emul/linux/bin/ls /" triggers
	the following panic.

panic: vput: null vp
Stopped in pid 859.1 (ls) at    netbsd:cpu_Debugger+0x4:        popl    %ebp
db{0}> tr
cpu_Debugger(c04d4337,cc73f9c8,cc7d6114,c0511b40,13a) at netbsd:cpu_Debugger+0x4

panic(c04d5ef3,0,4cd,c037a095,cb9d9000) at netbsd:panic+0x155
vput(0,151154c,cc73fa0c,c03781f5,cc73fa00) at netbsd:vput+0x181
lookup(cc73fad8,20002,400,cc73faf4,0) at netbsd:lookup+0x7c8
namei(cc73fad8,462c128c,3c,84a286,0) at netbsd:namei+0x13e
do_sys_stat(cc709b00,bfbfeb53,40,cc73fb5c,0) at netbsd:do_sys_stat+0x3f
linux_do_stat64(40,cc73fc48,cc73fc68,0,c03d5503) at netbsd:linux_do_stat64+0x33
linux_syscall_plain(cc73fc88,23,23,23,23) at netbsd:linux_syscall_plain+0xc7
db{0}>

(gdb) l *(lookup+0x7c8)
0xc0367398 is in lookup (/siro/nbsd/src/sys/kern/vfs_lookup.c:603).
598                                      * matches that returned for "/" and loop
599                                      * forever. So convert to to the real root.
600                                      */
601                                     vput(dp);
602                                     vput(ndp->ni_dvp);
603                                     ndp->ni_dvp = NULL;
604                                     dp = ndp->ni_rootdir;
605                                     VREF(dp);
606                                     vn_lock(dp, LK_EXCLUSIVE | LK_RETRY);
607                             }
(gdb)

>How-To-Repeat:
	see above.
>Fix:
	

>Unformatted: