Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/miscfs/procfs/procfs_vnops.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/miscfs/procfs/procfs_vnops.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.140.2.1 retrieving revision 1.140.2.2 diff -u -p -r1.140.2.1 -r1.140.2.2 --- src/sys/miscfs/procfs/procfs_vnops.c 2006/12/06 13:33:08 1.140.2.1 +++ src/sys/miscfs/procfs/procfs_vnops.c 2007/01/03 16:43:04 1.140.2.2 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_vnops.c,v 1.140.2.1 2006/12/06 13:33:08 tron Exp $ */ +/* $NetBSD: procfs_vnops.c,v 1.140.2.2 2007/01/03 16:43:04 tron Exp $ */ /* * Copyright (c) 1993, 1995 @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.140.2.1 2006/12/06 13:33:08 tron Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.140.2.2 2007/01/03 16:43:04 tron Exp $"); #include #include @@ -1090,7 +1090,8 @@ procfs_validfile_linux(l, mp) int flags; flags = VFSTOPROC(mp)->pmnt_flags; - return (flags & PROCFSMNT_LINUXCOMPAT) && procfs_validfile(l, mp); + return (flags & PROCFSMNT_LINUXCOMPAT) && + (l == NULL || l->l_proc == NULL || procfs_validfile(l, mp)); } struct procfs_root_readdir_ctx {