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
456af86363
commit
15d16124c2
@ -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