NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/42205: kernel panic at activated userquota



The following reply was made to PR kern/42205; it has been noted by GNATS.

From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
To: 6bone%6bone.informatik.uni-leipzig.de@localhost
Cc: gnats-bugs%NetBSD.org@localhost, kern-bug-people%NetBSD.org@localhost, 
gnats-admin%NetBSD.org@localhost,
        netbsd-bugs%NetBSD.org@localhost
Subject: Re: kern/42205: kernel panic  at activated userquota
Date: Wed, 6 Jan 2010 19:29:55 +0100

 --/9DWx/yDrRhgMJTb
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Sat, Nov 21, 2009 at 06:58:17PM +0100, Manuel Bouyer wrote:
 > On Thu, Nov 05, 2009 at 07:55:41AM +0100, 
 > 6bone%6bone.informatik.uni-leipzig.de@localhost wrote:
 > > qsync vp wihout ip: vnode @ 0xffff8000974df5f0, flags (10<MPSAFE>)
 > >         tag VT_UFS(1), type VLNK(5), usecount 1, writecount 0, holdcount 
 > > 0
 > >         freelisthd 0x0, mount 0xffff800072988000, data 
 > > 0xffff8000974e0dc0 lock 0xffff8000974df6f8 recursecnt 0
 > >         tag VT_UFS, ino 55338475, on dev 19, 4 flags 0x0, effnlink 1, 
 > > nlink 1
 > >         mode 0120775, owner 1007, group 100, size 31
 > 
 > Wow, not that's strange. we get there because VTOI(vp) == NULL.
 > VTOI is ((struct inode *)(vp)->v_data), and v_data is obviously not NULL
 > in this vnode. How could this happen ?
 
 I have an idea on how this can happen; the vnode is put on the mnt list before
 initialisation is completed. But then its type should be VNON and so it should
 be skipped.
 
 Anyway, ffs_sync() checks for both v_type == VNON and VTOI(vp) == NULL, so
 we could do the same in qsync. While there also check for VCLEAN, like
 ffs_sync() although this should also not be needed.
 Can you see if the attached patch prevents the vprint from firing ?
 
 -- 
 Manuel Bouyer <bouyer%antioche.eu.org@localhost>
      NetBSD: 26 ans d'experience feront toujours la difference
 --
 
 --/9DWx/yDrRhgMJTb
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="quota.diff2"
 
 Index: ufs/ufs_quota.c
 ===================================================================
 RCS file: /cvsroot/src/sys/ufs/ufs/ufs_quota.c,v
 retrieving revision 1.60.10.1
 diff -u -r1.60.10.1 ufs_quota.c
 --- ufs/ufs_quota.c    2 Feb 2009 18:24:17 -0000       1.60.10.1
 +++ ufs/ufs_quota.c    6 Jan 2010 18:22:55 -0000
 @@ -728,8 +728,9 @@
        for (vp = TAILQ_FIRST(&mp->mnt_vnodelist); vp; vp = vunmark(mvp)) {
                vmark(mvp, vp);
                mutex_enter(&vp->v_interlock);
 -              if (vp->v_mount != mp || vismarker(vp) || vp->v_type == VNON ||
 -                  (vp->v_iflag & VI_CLEAN) != 0) {
 +              if (VTOI(vp) == NULL || vp->v_mount != mp || vismarker(vp) ||
 +                  vp->v_type == VNON ||
 +                  (vp->v_iflag & (VI_XLOCK | VI_CLEAN)) != 0) {
                        mutex_exit(&vp->v_interlock);
                        continue;
                }
 
 --/9DWx/yDrRhgMJTb--
 


Home | Main Index | Thread Index | Old Index