mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Unlock the cache lock before returning when we run out of buffer space
trying to fill in the full path name. Reported by: David Naylor <naylor.b.david@gmail.com> Approved by: kib
This commit is contained in:
parent
b87ce5545b
commit
8a4444049e
1 changed files with 4 additions and 1 deletions
|
|
@ -1140,8 +1140,10 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir,
|
|||
error = vn_vptocnp_locked(&vp, buf, &buflen);
|
||||
if (error)
|
||||
return (error);
|
||||
if (buflen == 0)
|
||||
if (buflen == 0) {
|
||||
CACHE_RUNLOCK();
|
||||
return (ENOMEM);
|
||||
}
|
||||
buf[--buflen] = '/';
|
||||
slash_prefixed = 1;
|
||||
}
|
||||
|
|
@ -1169,6 +1171,7 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir,
|
|||
if (error)
|
||||
break;
|
||||
if (buflen == 0) {
|
||||
CACHE_RUNLOCK();
|
||||
error = ENOMEM;
|
||||
SDT_PROBE(vfs, namecache, fullpath, return, error,
|
||||
startvp, NULL, 0, 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue