Date: Mon, 3 Mar 1997 23:50:57 -0600 From: Jonathan Lemon <jlemon@americantv.com> To: Michael Smith <msmith@atrad.adelaide.edu.au> Cc: proff@iq.org, hackers@FreeBSD.ORG Subject: Re: xemacs crashes kernel Message-ID: <19970303235057.26399@right.PCS> In-Reply-To: <199703040532.QAA10831@genesis.atrad.adelaide.edu.au>; from Michael Smith on Mar 03, 1997 at 04:02:00PM %2B1030 References: <19970303230157.25741@right.PCS> <199703040532.QAA10831@genesis.atrad.adelaide.edu.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 03, 1997 at 04:02:00PM +1030, Michael Smith wrote: > error = VOP_FSYNC(vp, fp->f_cred, > (vp->v_mount->mnt_flag & MNT_ASYNC) ? MNT_NOWAIT : MNT_WAIT, p); > > MNT_ASYNC is 0x40, and mnt_flag looks to be about 0x18 offset in the > mount structure. Looks like maybe someone trying to fsync something > that's not a file, although a quick test here doesn't indicate that. > > Are non-file items supposed to have valid v_mount pointers? Other places > in the kernel that look at vp->v_mount often check it against zero first; > should that be done here, eg. > > (vp->v_mount && (vp->v_mount->mnt_flag & MNT_ASYNC)) ? MNT_NOWAIT... > > as well? This looks like it might have been overlooked when the async > filesystem stuff came in, as old versions of this code read : > > error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p); > > Suggestions? Jonathan, can you try the above and see if it cures your > problem? I changed the fsync code to read: error = VOP_FSYNC(vp, fp->f_cred, (vp->v_mount && (vp->v_mount->mnt_flag & MNT_ASYNC)) ? MNT_NOWAIT : MNT_WAIT, p); And it doesn't crash the kernel any more. I'm not sure if this is the right fix or not. Julian - you might want to try this as well. (btw, mail to @iq.com bounces from here. :-( ) -- Jonathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970303235057.26399>