Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Feb 2001 06:10:05 -0800 (PST)
From:      David Malone <dwmalone@maths.tcd.ie>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/25206: Kernel Panic
Message-ID:  <200102201410.f1KEA5948150@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/25206; it has been noted by GNATS.

From: David Malone <dwmalone@maths.tcd.ie>
To: mm@omnix.net
Cc: freebsd-gnats-submit@FreeBSD.org, peter@FreeBSD.org,
	iedowse@maths.tcd.ie
Subject: Re: kern/25206: Kernel Panic
Date: Tue, 20 Feb 2001 14:03:29 +0000

 On Mon, Feb 19, 2001 at 11:34:40AM -0800, mm@omnix.net wrote:
 
 > luser@PAF$ tail -f /dev/ttyp1
 > 
 > now ruser is going to connect to my box:
 > ruser@NOWHERE$ telnet PAF
 > Connection closed by foreign host.
 
 This seems to be caused by kqueue trying to work on a revoked file
 discriptor. I think this bug is inaccessable in more recent versions
 of -stable after Peter's commit to vfs_vnops.c on 2001/02/09. The
 offending code looks like:
 
 static int
 filt_vnread(struct knote *kn, long hint)
 {
         struct vnode *vp = (struct vnode *)kn->kn_fp->f_data;
         struct inode *ip = VTOI(vp);
 
         kn->kn_data = ip->i_size - kn->kn_fp->f_offset;
         return (kn->kn_data != 0);
 }
 
 There is now a check to make sure that the file is in a UFS filesystem
 at the time the filter is attached. However, if the file is revoked
 it could change type, so checking something like:
 
 	if (vp->v_tag != VT_UFS)
 		return 1;
 
 might be a good idea. (Currently only device files can be revoked,
 but that's only 'cos it was disabeled on other file types 'cos it
 didn't work on fifos).
 
 	David.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102201410.f1KEA5948150>