For cd9660_ioctl, check for recycled vnode after locking it.
Noted by: Jaakko Heinonen <jh saunalahti fi> MFC after: 2 weeks
This commit is contained in:
parent
029cb9c79d
commit
93bc76dc3e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user