Madhu Thorat has uploaded this change for review. (
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/488545 )
Change subject: Clear no_cleanup while holding state_lock
......................................................................
Clear no_cleanup while holding state_lock
Currently with d3b90cfb73d15f4dfc4f917f4609a3a79cae37d1, in
open4_ex() we are setting 'no_cleanup=false' after releasing
state_lock. It is possible that a thread A may release
the state_lock, but before it could set 'no_cleanup=false' another
thread B may take the same lock and set 'no_cleanup=true'. So since
thread A may set 'no_cleanup=false' after thread B had set
'no_cleanup=true', this would lead to a crash (abort) in state_wipe_file()
as 'no_cleanup=false' but 'state_lock' was already acquired.
So we now set 'no_cleanup=false' while holding state_lock.
Change-Id: Iefe2a7d979901d8f291b32ac0838a03d1ca08fb0
Signed-off-by: Madhu Thorat <madhu.punjabi(a)in.ibm.com>
---
M src/Protocols/NFS/nfs4_op_open.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/45/488545/1
--
To view, visit
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/488545
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: Iefe2a7d979901d8f291b32ac0838a03d1ca08fb0
Gerrit-Change-Number: 488545
Gerrit-PatchSet: 1
Gerrit-Owner: Madhu Thorat <madhu.punjabi(a)in.ibm.com>
Gerrit-MessageType: newchange