Skip to content
Commit 184cefbe authored by Benjamin Coddington's avatar Benjamin Coddington Committed by Chuck Lever
Browse files

NLM: Defend against file_lock changes after vfs_test_lock()



Instead of trusting that struct file_lock returns completely unchanged
after vfs_test_lock() when there's no conflicting lock, stash away our
nlm_lockowner reference so we can properly release it for all cases.

This defends against another file_lock implementation overwriting fl_owner
when the return type is F_UNLCK.

Reported-by: default avatarRoberto Bergantinos Corpas <rbergant@redhat.com>
Tested-by: default avatarRoberto Bergantinos Corpas <rbergant@redhat.com>
Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent c770f31d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment