]> git.michaelhowe.org Git - packages/o/openafs.git/commit
namei: Set inconsistent linktable linkCount to 0
authorAndrew Deason <adeason@sinenomine.net>
Tue, 1 Oct 2013 22:31:44 +0000 (17:31 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 27 Feb 2014 16:00:50 +0000 (08:00 -0800)
commit65847d19c6a795709cb5523e5927e5d0a9b24302
tree063f1003e4e4669a8d1cc9a9168b8a6a9c19f7b8
parente10a3efe5828e4f1f98ea456d8507e9a93b023ab
namei: Set inconsistent linktable linkCount to 0

Currently, if we detect an inconsistent linktable filename (where the
filename indicates it's for a different volume than the directory path
indicates), we don't set the linkCount for the inode info. This means
that our caller will get random garbage for the linkCount.

In many cases this value is ignored, but for the salvager, if this is
the only linktable file we find, we treat it as the linktable we
should be using. Thus, if linkCount contains undefined data, we might
try to INC or DEC the linktable a bunch of times, depending on what
random stack garbage the linkCount is filled with.

The salvager shouldn't be INC/DEC'ing these linktables according to
the their linkCount anyway, but in the meantime, at least ensure that
this doesn't contain stack garbage, so we ensure that we won't try to
INC or DEC this thousands or millions of times.

Reviewed-on: http://gerrit.openafs.org/10320
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 2286fac1447e2e9e834957ec414cb5605f51e63b)

Change-Id: I480ad328d594531869874b4207629533553bfc64
Reviewed-on: http://gerrit.openafs.org/10770
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/vol/namei_ops.c