[TEST] device and fifo vnode bypass, Giantfree select/poll
Poul-Henning Kamp
phk at phk.freebsd.dk
Sat Nov 13 15:28:08 PST 2004
This solves the problem seen in the device vnode bypass mode
(vfs.devfs.fops=1), typically with a message like:
panic: specread() on un-referenced struct cdev *(ttyp1)
Please try setting vfs.devfs.fops=1 in loader.conf again and beat
up the code even harder.
I have code in p4:phk_bufwork which does vnode bypass for FIFOs
and Giant free select(2)/poll(2) for networking. If you have
perforce access, please help beat up on this code.
Poul-Henning
In message <200411132321.iADNLsZN032634 at repoman.freebsd.org>, Poul-Henning Kamp
writes:
>phk 2004-11-13 23:21:54 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/fs/devfs devfs_vnops.c
> Log:
> Add the devfs_fp_check() function which helps us get from a struct file
> to a cdev and a devsw, doing all the relevant checks along the way.
>
> Add the check to see if fp->f_vnode->v_rdev differs from our cached
> fp->f_data copy of our cdev. If it does the device was revoked and
> we return ENXIO.
>
> Revision Changes Path
> 1.83 +34 -70 src/sys/fs/devfs/devfs_vnops.c
>
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-current
mailing list