summaryrefslogtreecommitdiffstats
path: root/sys/fs/cd9660
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-06-10 15:48:34 +0000
committerkib <kib@FreeBSD.org>2009-06-10 15:48:34 +0000
commitda55852c4a6afecf97992606ad74162377da4422 (patch)
treec93d6437e9372ddbeda7d4b0898a7fee69194272 /sys/fs/cd9660
parent42b3c3219735b93bee6faad0cdc64c925d907212 (diff)
downloadFreeBSD-src-da55852c4a6afecf97992606ad74162377da4422.zip
FreeBSD-src-da55852c4a6afecf97992606ad74162377da4422.tar.gz
For cd9660_ioctl, check for recycled vnode after locking it.
Noted by: Jaakko Heinonen <jh saunalahti fi> MFC after: 2 weeks
Diffstat (limited to 'sys/fs/cd9660')
-rw-r--r--sys/fs/cd9660/cd9660_vnops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c
index 1170b67..55ea46b 100644
--- a/sys/fs/cd9660/cd9660_vnops.c
+++ b/sys/fs/cd9660/cd9660_vnops.c
@@ -257,6 +257,10 @@ cd9660_ioctl(ap)
vp = ap->a_vp;
vn_lock(vp, LK_SHARED | LK_RETRY);
+ if (vp->v_iflag & VI_DOOMED) {
+ VOP_UNLOCK(vp, 0);
+ return (EBADF);
+ }
if (vp->v_type == VCHR || vp->v_type == VBLK) {
VOP_UNLOCK(vp, 0);
return (EOPNOTSUPP);
OpenPOWER on IntegriCloud