OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_13_2-35-ge30903a
Gerrit Code Review
gerrit@openafs.org
Thu, 27 Mar 2025 16:54:59 -0400
The following commit has been merged in the openafs-stable-1_8_x branch:
commit e30903a9d66f37fdf00603586529ce077f69da85
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Fri Jul 17 17:27:51 2020 -0400
viced: Set FS_STATE_DUMP_MODE earlier
When the fileserver saves its callback state to disk on shutdown,
fs_stateCreateDump sets state->mode to FS_STATE_DUMP_MODE. But this is
after some code paths have already looked at state->mode, such as
fs_stateSave -> h_stateVerify -> h_Enumerate_r -> h_stateVerifyHost ->
h_stateVerifyAddrHash. This doesn't cause any problems right now,
since the value of FS_STATE_DUMP_MODE is 0, and we zero the whole
'state' struct when it is initialized.
This is confusing, though, so move the assignment of
FS_STATE_DUMP_MODE to earlier in the state-saving process, before
anything looks at it.
To try to avoid possible uninitialized use of state->mode in the
future, change the FS_STATE_*_MODE constants so that none of them are
0, and make sure that code checking the 'mode' checks that the mode is
a valid constant.
[adeason@sinenomine.net: Added state mode checking.]
Reviewed-on: https://gerrit.openafs.org/14726
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
(cherry picked from commit 900d89380dea5703a365aed61e998c5f1004b056)
Change-Id: I76ca239c9c28cfb524631ce5f5688eeb443b846a
Reviewed-on: https://gerrit.openafs.org/16018
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/viced/host.c | 14 ++++++++++++--
src/viced/serialize_state.c | 5 +++--
src/viced/serialize_state.h | 4 ++--
3 files changed, 17 insertions(+), 6 deletions(-)
--
OpenAFS Master Repository