diff options
author | phk <phk@FreeBSD.org> | 2004-12-20 21:12:11 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-12-20 21:12:11 +0000 |
commit | 4483c946629024f7665cca045a102f20d53bdd3b (patch) | |
tree | 0da31d1d69deae3993e00d2d61831d3a4f4e5f02 /sys | |
parent | bb3e4ff4e1eb5d168a14c0e0bbbe007e51332046 (diff) | |
download | FreeBSD-src-4483c946629024f7665cca045a102f20d53bdd3b.zip FreeBSD-src-4483c946629024f7665cca045a102f20d53bdd3b.tar.gz |
Add a couple of KASSERTS to try to diagnose a problem reported.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 0ddfde1..e0f578f 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -395,8 +395,12 @@ devfs_getattr(ap) struct cdev *dev; de = vp->v_data; - if (vp->v_type == VDIR) + KASSERT(de != NULL, ("Null dirent in devfs_getattr vp=%p", vp)); + if (vp->v_type == VDIR) { de = de->de_dir; + KASSERT(de != NULL, + ("Null dir dirent in devfs_getattr vp=%p", vp)); + } bzero((caddr_t) vap, sizeof(*vap)); vattr_null(vap); vap->va_uid = de->de_uid; |