mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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: Roberto Bergantinos Corpas <rbergant@redhat.com> Tested-by: Roberto Bergantinos Corpas <rbergant@redhat.com> Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
committed by
Chuck Lever
parent
c770f31d8f
commit
184cefbe62
@@ -292,6 +292,7 @@ void nlmsvc_locks_init_private(struct file_lock *, struct nlm_host *, pid_t);
|
||||
__be32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **,
|
||||
struct nlm_lock *);
|
||||
void nlm_release_file(struct nlm_file *);
|
||||
void nlmsvc_put_lockowner(struct nlm_lockowner *);
|
||||
void nlmsvc_release_lockowner(struct nlm_lock *);
|
||||
void nlmsvc_mark_resources(struct net *);
|
||||
void nlmsvc_free_host_resources(struct nlm_host *);
|
||||
|
||||
Reference in New Issue
Block a user