[XS] Change in ...nfs-ganesha[next]: Initialise export_opt_lock statically
Bjorn Leffler has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1246765?usp=email ) Change subject: Initialise export_opt_lock statically ...................................................................... Initialise export_opt_lock statically nfsd is built from MainNFSD/nfs_main.c, which never calls PTHREAD_RWLOCK_init() on export_opt_lock -- only the library entry point nfs_lib.c does -- yet export_defaults_commit() write-locks it while reading exports. A zeroed pthread_rwlock_t happens to be a valid unlocked lock on glibc, so this goes unnoticed there. It is not guaranteed by POSIX, and pthread implementations that validate the lock reject it: export_defaults_commit :RW LOCK :CRIT :Error 22, write locking PTHREAD_RWLOCK_INITIALIZER is all-zero on glibc, so the generated code is unchanged there. Change-Id: Iee1852e724fb8788abd01bcb05dc9ac7f4176625 Signed-off-by: Bjorn Leffler <github@leffler.org> --- M src/support/exports.c 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/65/1246765/1 -- To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1246765?usp=email To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-Change-Id: Iee1852e724fb8788abd01bcb05dc9ac7f4176625 Gerrit-Change-Number: 1246765 Gerrit-PatchSet: 1 Gerrit-Owner: Bjorn Leffler <github@leffler.org>
participants (1)
-
Bjorn Leffler (GerritHub)