Matthew DeVore has uploaded this change for review.

View Change

secinfo: Grab lock only after confirming directory

We need to check the object type before grabbing one of the locks in the
state_hdl. As a bonus, this change deletes an "extra" unlock call needed
as a result of the if block usage.

Fixes crash that occurs on macOS when running st_create.testBlock from
pynfs, because it prevents access of the lock in the wrong side of the
lock union in state_hdl.

Change-Id: I5b40b8fa2ff11076b2858972ab4756458f36c816
Signed-off-by: Matthew DeVore <matvore@google.com>
---
M src/Protocols/NFS/nfs4_op_secinfo.c
1 file changed, 14 insertions(+), 10 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/50/505150/1

To view, visit change 505150. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I5b40b8fa2ff11076b2858972ab4756458f36c816
Gerrit-Change-Number: 505150
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew DeVore <matvore@google.com>
Gerrit-MessageType: newchange