vfs: fix vnode use count leak in O_EMPTY_PATH support
The vnode returned by namei_setup is already referenced. Reported by: pho
This commit is contained in:
parent
82483ea7ad
commit
cef8a95acb
@ -495,8 +495,10 @@ namei_emptypath(struct nameidata *ndp)
|
||||
goto errout;
|
||||
}
|
||||
|
||||
/*
|
||||
* Usecount on dp already provided by namei_setup.
|
||||
*/
|
||||
ndp->ni_vp = dp;
|
||||
vref(dp);
|
||||
namei_cleanup_cnp(cnp);
|
||||
pwd_drop(pwd);
|
||||
ndp->ni_resflags |= NIRES_EMPTYPATH;
|
||||
|
Loading…
Reference in New Issue
Block a user