In revoke(), verify that VCHR vnode indeed belongs to devfs.
Found and tested by: pho MFC after: 1 week
This commit is contained in:
parent
864104fe59
commit
aa81ae08e9
@ -4215,7 +4215,7 @@ revoke(td, uap)
|
||||
vfslocked = NDHASGIANT(&nd);
|
||||
vp = nd.ni_vp;
|
||||
NDFREE(&nd, NDF_ONLY_PNBUF);
|
||||
if (vp->v_type != VCHR) {
|
||||
if (vp->v_type != VCHR || vp->v_rdev == NULL) {
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user