Date: Wed, 10 Jun 2009 15:48:34 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r193930 - head/sys/fs/cd9660 Message-ID: <200906101548.n5AFmYjp018388@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Jun 10 15:48:34 2009 New Revision: 193930 URL: http://svn.freebsd.org/changeset/base/193930 Log: For cd9660_ioctl, check for recycled vnode after locking it. Noted by: Jaakko Heinonen <jh saunalahti fi> MFC after: 2 weeks Modified: head/sys/fs/cd9660/cd9660_vnops.c Modified: head/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vnops.c Wed Jun 10 15:26:35 2009 (r193929) +++ head/sys/fs/cd9660/cd9660_vnops.c Wed Jun 10 15:48:34 2009 (r193930) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906101548.n5AFmYjp018388>