mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 08:44:33 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=209742
|
@ -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 a new issue