summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-10-20 15:08:10 +0000
committerphk <phk@FreeBSD.org>2003-10-20 15:08:10 +0000
commit6b3ae2c6aa0f10746601afbfbe1ff11954038729 (patch)
tree9777348805d516c1fdb08f1011202f443d6e3c8b /sys/fs/devfs
parente83edc4bf65e1e28b335832fcaee8656f0cae78a (diff)
downloadFreeBSD-src-6b3ae2c6aa0f10746601afbfbe1ff11954038729.zip
FreeBSD-src-6b3ae2c6aa0f10746601afbfbe1ff11954038729.tar.gz
Remember to check the DE_WHITEOUT flag in the case where a cloned
device is hidden by a devfs(8) rule. Spotted by: Adam Nowacki <ptnowak@bsk.vectranet.pl>
Diffstat (limited to 'sys/fs/devfs')
-rw-r--r--sys/fs/devfs/devfs_vnops.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 7f57e7c..c9e6ad1 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -385,10 +385,15 @@ devfs_lookupx(ap)
devfs_populate(dmp);
dde = devfs_itode(dmp, cdev->si_inode);
- if (dde != NULL && *dde != DE_DELETED && *dde != NULL) {
- de = *dde;
- goto found;
- }
+
+ if (dde == NULL || *dde == NULL || *dde == DE_DELETED)
+ goto notfound;
+
+ if ((*dde)->de_flags & DE_WHITEOUT)
+ goto notfound;
+
+ de = *dde;
+ goto found;
notfound:
OpenPOWER on IntegriCloud