openafs/src
Andrew Deason dc8f18d6f5 Protect ubik cache accesses
Currently, ubik application cached data could be updated and read by
different threads simultaneously. Add a mechanism in ubik for
protecting accessing and updating the cached data. This adds the
function ubik_CheckCache to do this, and removes ubik_CacheUpdate as
an exported function (since it's not safe).

Update all callers to use the new mechanism. In ptserver, remove the
'initd' variable; just rely on cachedVersion and ubik_CheckCache to
tell us when to re-read the database. Remove db.lock in buserver and
cheader_lock in kaserver, which served similar (though not completely
threadsafe) protection as ubik_CheckCache. Add the ubik database lock
cache_lock to protect the application cache.

Change-Id: I857a67d410e2c539197c5212c3b114c3fd0403c2
Reviewed-on: http://gerrit.openafs.org/1546
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Russ Allbery <rra@stanford.edu>
2010-05-26 15:00:51 -07:00
..
afs avoid nat ping for authenticated connections 2010-05-26 12:05:03 -07:00
afsd NetBSD 5.0 support. 2010-05-03 19:55:30 -07:00
afsinstall
afsmonitor afsmonitor: fix segv on exit 2010-04-09 20:56:59 -07:00
afsweb
aklog Reallocate memory in aklog for the AFS ID string 2010-04-06 20:09:42 -07:00
audit
auth Tidy up UKERNEL includes 2010-04-15 15:56:05 -07:00
bozo dafs: don't restart for new binaries using mrafs scanner time 2010-05-19 08:40:24 -07:00
bu_utils
bubasics
bucoord Don't pass NULL to strcmp 2010-02-28 11:21:58 -08:00
budb Protect ubik cache accesses 2010-05-26 15:00:51 -07:00
butc Always include afsconfig.h 2010-05-06 11:52:08 -07:00
butm Include stdint.h when using intptr_t 2010-02-17 12:49:27 -08:00
cf Autoconf : Kill dead code 2010-05-24 21:41:54 -07:00
cmd
comerr Always include afsconfig.h in autogenerated files 2010-05-06 12:22:31 -07:00
config Fix libafs_tree's cross-architecture support 2010-05-24 20:28:41 -07:00
des Tidy up UKERNEL includes 2010-04-15 15:56:05 -07:00
dir Add some directory package doxygen comments 2010-04-27 14:37:09 -07:00
export
external Import of code from heimdal 2010-05-24 21:45:22 -07:00
finale
fsint Tidy up UKERNEL includes 2010-04-15 15:56:05 -07:00
fsprobe
gtx kill macos prior to panther 2010-02-17 10:49:18 -08:00
JAVA Always include afsconfig.h 2010-05-06 11:52:08 -07:00
kauth Protect ubik cache accesses 2010-05-26 15:00:51 -07:00
kopenafs Improve shared library building support 2010-04-25 20:49:19 -07:00
libacl viced avoid global pruclient during acl ops 2010-02-23 22:15:48 -08:00
libadmin Warning fix: print burstWait fields 2010-03-23 15:56:26 -07:00
libafs Kill FBSD4X with fire 2010-05-17 05:36:29 -07:00
libafsauthent
libafsrpc Move rxkad/domestic/* into rxkad/ directory proper 2010-04-25 20:55:03 -07:00
libuafs Kill FBSD4X with fire 2010-05-17 05:36:29 -07:00
log
lwp Fix UCONTEXT detection on ppc_linux26 via include order 2010-04-21 16:09:04 -07:00
mcas
packaging darwin afs.conf: growlagent example 2010-05-18 10:46:25 -07:00
pam Improve shared library building support 2010-04-25 20:49:19 -07:00
platform afsprefs: clarify restart requirement 2010-05-17 05:42:14 -07:00
procmgmt
ptserver Protect ubik cache accesses 2010-05-26 15:00:51 -07:00
rx linux include osi_compat.h in rx/LINUX/rx_knet.c 2010-05-18 06:10:50 -07:00
rxdebug Correct incorrect type-punning fixes 2010-04-09 13:12:21 -07:00
rxgen Always include afsconfig.h in autogenerated files 2010-05-06 12:22:31 -07:00
rxkad Always include afsconfig.h 2010-05-06 11:52:08 -07:00
rxstat Always include afsconfig.h 2010-05-06 11:52:08 -07:00
scout scout: adjustable column widths 2010-05-26 07:58:36 -07:00
sgistuff
shlibafsauthent Improve shared library building support 2010-04-25 20:49:19 -07:00
shlibafsrpc Move rxkad/domestic/* into rxkad/ directory proper 2010-04-25 20:55:03 -07:00
sys Move non-executable stack assembly code to end of file 2010-03-22 14:37:06 -07:00
tbudb
tbutc
tests Always include afsconfig.h 2010-05-06 11:52:08 -07:00
tools
tptserver
tsalvaged fssync-debug: fix strict-aliasing problems 2010-04-01 14:38:05 -07:00
tsm41 aix krb5 error message handling 2010-03-21 09:51:55 -07:00
tubik Remove duplicate make targets in tubik, cleanup dependencies 2010-03-02 16:09:02 -08:00
tviced Replace unsafe use of gets() 2010-04-14 19:18:39 -07:00
tvlserver
tvolser
ubik Protect ubik cache accesses 2010-05-26 15:00:51 -07:00
update update link order 2010-03-22 14:56:43 -07:00
usd Include stdint.h when using intptr_t 2010-02-17 12:49:27 -08:00
uss
util Add an OpenAFS config file parser 2010-05-26 09:38:04 -07:00
venus fs getserverprefs needs a larger buffer 2010-05-24 21:43:20 -07:00
vfsck
viced vol, volser, and viced type fixes 2010-05-24 20:56:05 -07:00
vlserver Protect ubik cache accesses 2010-05-26 15:00:51 -07:00
vol vol, volser, and viced type fixes 2010-05-24 20:56:05 -07:00
volser dumpstuff nbytes can't exceed 32 bits 2010-05-25 21:28:23 -07:00
WINNT windows handle NONODE case uniformly in cm_BPlusDirDeleteEntry 2010-05-25 12:42:37 -07:00
xstat Unix CM: Tidy up the statistics interface 2010-02-17 05:10:05 -08:00
.gitignore
BUILDNOTES
DOLASTCMP.BAT
helper-splint.sh.in
libafsdep
LICENSE Synchronize LICENSE files 2010-05-25 21:27:36 -07:00
mkdest.pl
ntbuild.bat
NTMakefile Really kill des_stub 2010-04-25 19:02:35 -07:00
NTObjdir Move rxkad/domestic/* into rxkad/ directory proper 2010-04-25 20:55:03 -07:00
rmbat.bat
rmbat.rsp
SOURCE-MAP
splint.cfg
symlink.bat
TechNotes-JavaAPI