]> git.michaelhowe.org Git - packages/o/openafs.git/commit
FBSD: plug refcount leak in pioctl
authorBen Kaduk <kaduk@mit.edu>
Wed, 29 May 2013 23:18:22 +0000 (19:18 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 31 Oct 2013 17:25:10 +0000 (10:25 -0700)
commitce19d1de2a12a31db8785309e108253c2a401076
tree130d3692805b02f2e35c1d927155225d05591208
parent0d41c9a09206ad2b74a494f49469e289d3617087
FBSD: plug refcount leak in pioctl

When gop_lookupname_user returns a non-NULL vnode, the vnode came
from afs_GetVCache (by way of afs_lookup) which takes a reference
on the vnode entry.  There's no need to take another spurious
reference here.  The existing code already knows that there's a
reference in place, as there is an AFS_RELE down where FBSD80_ENV
unlocks the vnode if it's locked (that code is also suspicious).

Prior to this patch, things like 'fs flush /path/to/file' would
leak a reference on that cache entry, preventing clean shutdown.

Reviewed-on: http://gerrit.openafs.org/9957
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 2bbba424ad6728a221688f782b4df90bf6da4a63)

Change-Id: If9435903b32ca7001b418bc7a0fb611bda4d424e
Reviewed-on: http://gerrit.openafs.org/10380
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/afs_pioctl.c