On Fri, May 15, 2009 at 05:32:49AM -0700, Chris Timmons wrote: > > #8 0xc076cf64 in devfs_fp_check (fp=0xc78fadf4, devp=0xee156b0c, > dswp=0xee156b08) at /usr/src/sys/fs/devfs/devfs_vnops.c:89 > 89 *dswp = devvn_refthread(fp->f_vnode, devp); > > (kgdb) p *(struct file *)0xc78fadf4 > $1 = {f_list = {le_next = 0xc78ab5f0, le_prev = 0xc789e5f0}, f_type = 1, > f_data = 0xce5f9b00, f_flag = 3, f_mtxp = 0xc74540a0, f_ops = 0xc0c48e80, > f_cred = 0xc7ae1c00, f_count = 2, f_vnode = 0xc90f4000, f_offset = 0, > f_vnread_flags = 0, f_gcflag = 0, f_msgcount = 0, f_seqcount = 1, > f_nextoff = 0, f_label = 0x0, f_cdevpriv = 0x0} > > > > On Fri, 15 May 2009, Kostik Belousov wrote: > > >>#8 0xc076cf64 in devfs_fp_check (fp=0xc78fadf4, devp=0xee156b0c, > >>dswp=0xee156b08) at /usr/src/sys/fs/devfs/devfs_vnops.c:89 > >Please, show the output of > >p *(struct file *)0xc78fadf4
The file structure in the dump is fully initialized. It seems that the issue is with devfs replacing file ops vector with devfs-specific one in devfs_open() before the struct file is fully initialized in vn_open. Please, try the patch below (against 7) and report results. Index: fs/devfs/devfs_vnops.c =================================================================== --- fs/devfs/devfs_vnops.c (revision 192089) +++ fs/devfs/devfs_vnops.c (working copy) @@ -890,6 +890,7 @@ if (fp != NULL) { FILE_LOCK(fp); fp->f_data = dev; + fp->f_vnode = vp; FILE_UNLOCK(fp); } fpop = td->td_fpop;
pgpQLfMDvI4aV.pgp
Description: PGP signature