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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to