Change in ...nfs-ganesha[next]: Always initialize rwlock when creating acl object
Matthew DeVore has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/526277 ) Change subject: Always initialize rwlock when creating acl object ...................................................................... Always initialize rwlock when creating acl object In one call site for nfs4_acl_alloc, there was error handling for the return of pthread_rwlock_init. I removed this I'm using PTHREAD_RWLOCK_init which abort()s on error. The glibc and macOS implementations of pthread_rwlock_init always return 0. See [0] and [1]. Initializing rwlock objects is critical in macOS, where unlike Linux, operations on non-initialized rwlock objects result in error, and zero'd out memory (as returned by calloc) is not considered a valid initialization state. [0] https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_rwlock_init.c;... [1] https://opensource.apple.com/source/libpthread/libpthread-454.120.2/src/pthr... Signed-off-by: Matthew DeVore <matvore@google.com> Change-Id: I802d9bd696979a6801e5ab8a70a0021ed6918720 --- M src/support/nfs4_acls.c 1 file changed, 7 insertions(+), 14 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/77/526277/1 -- To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/526277 To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-Change-Id: I802d9bd696979a6801e5ab8a70a0021ed6918720 Gerrit-Change-Number: 526277 Gerrit-PatchSet: 1 Gerrit-Owner: Matthew DeVore <me@matvore.com> Gerrit-MessageType: newchange
participants (1)
-
Matthew DeVore (GerritHub)