diff options
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 6 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 01690a4..16d51e7 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -216,9 +216,13 @@ cd9660_mount(mp, path, data, ndp, p) NDFREE(ndp, NDF_ONLY_PNBUF); devvp = ndp->ni_vp; + if (devsw(devvp->v_rdev) == NULL) { + vrele(devvp); + return (ENXIO); + } if (!vn_isdisk(devvp)) { vrele(devvp); - return ENOTBLK; + return (ENOTBLK); } /* diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 01690a4..16d51e7 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -216,9 +216,13 @@ cd9660_mount(mp, path, data, ndp, p) NDFREE(ndp, NDF_ONLY_PNBUF); devvp = ndp->ni_vp; + if (devsw(devvp->v_rdev) == NULL) { + vrele(devvp); + return (ENXIO); + } if (!vn_isdisk(devvp)) { vrele(devvp); - return ENOTBLK; + return (ENOTBLK); } /* |