mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
Do not try to increase the refcount of a NULL vnode
osi_lookup is not guaranteed to give us a valid vnode, so check before calling VN_HOLD(). Change-Id: I3d2a4d441f6991c08beccb6b10a428f5746db146 Reviewed-on: http://gerrit.openafs.org/1967 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
c0afd1419d
commit
0f36d82e89
@ -1133,7 +1133,8 @@ afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow)
|
||||
#else
|
||||
code = gop_lookupname_user(path, AFS_UIOUSER, follow, &vp);
|
||||
#if defined(AFS_FBSD80_ENV) /* XXX check on 7x */
|
||||
VN_HOLD(vp);
|
||||
if (vp != NULL)
|
||||
VN_HOLD(vp);
|
||||
#endif /* AFS_FBSD80_ENV */
|
||||
#endif /* AFS_LINUX22_ENV */
|
||||
#endif /* AFS_AIX41_ENV */
|
||||
|
Loading…
Reference in New Issue
Block a user