Subject: Re: 4.99.16 (-current) panic
To: Gert Doering <gert@greenie.muc.de>
From: Antti Kantee <pooka@cs.hut.fi>
List: port-sparc64
Date: 04/09/2007 22:45:30
On Mon Apr 09 2007 at 21:30:43 +0200, Gert Doering wrote:
> Adding interface aliases:
> Building databases...
> Starting syslogd.
> Checking for core dump...
> savecore: /4netbsd: _time not in namelist
> Starting named.
> Apr  9 21:07:10 kirk /netbsd: kbd0: reset failed
> Apr  9 21:07:09 kirk savecore: /4netbsd: _time not in namelist
> Setting date via ntp.
> Apr  9 21:07:12 kirk ntpdate[571]: sendto(ns6.dns.space.net): Undefined error: 0
> Starting rpcbind.
> Mounting all filesystems...
> Clearing /tmp.
> Checking quotas: done.
> Starting mountd.
> vput: bad ref count: tag VT_UFS(1) type VDIR(2), usecount -1, writecount 0, refcount 0, flags (0<LOCKSWORK>)
> 	tag VT_UFS, ino 667648, on dev 12, 4 flags 0x0, effnlink 55, nlink 55
> 	mode 040755, owner 202, group 0, size 1536 not locked
> panic: vput: ref cnt
> cpu0: kdb breakpoint at 12f1240
> Stopped in pid 623.1 (mountd) at        netbsd:cpu_Debugger+0x4:        nop
> db> trace
> vput(c87f050, be98480, 0, c823c60, c823ca8, 1c) at netbsd:vput+0xcc
> sys_mount(16, 20a0e0, c823e00, 212628, 14c8, 6) at netbsd:sys_mount+0x88
> syscall_plain(c823ed0, 4, 40932a34, 40932a38, 2, 40932a34) at netbsd:syscall_pla

Ok, that's pretty obvious stuff.

        } else if (SCARG(uap, flags) & MNT_UPDATE) {
                error = mount_update(l, vp, SCARG(uap, path),
                    SCARG(uap, flags), SCARG(uap, data), &nd);
                vput(vp);

and (mount_update())

        /* We can't operate on VROOT here. */
        if ((vp->v_flag & VROOT) == 0) {
                vput(vp);
                error = EINVAL;
                goto out;
        }

Index: vfs_syscalls.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_syscalls.c,v
retrieving revision 1.306
diff -u -r1.306 vfs_syscalls.c
--- vfs_syscalls.c      10 Mar 2007 16:50:01 -0000      1.306
+++ vfs_syscalls.c      9 Apr 2007 19:44:56 -0000
@@ -157,7 +157,6 @@
 
        /* We can't operate on VROOT here. */
        if ((vp->v_flag & VROOT) == 0) {
-               vput(vp);
                error = EINVAL;
                goto out;
        }


-- 
Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
http://www.iki.fi/pooka/                          http://www.NetBSD.org/
    "la qualité la plus indispensable du cuisinier est l'exactitude"