diff options
author | David Howells <dhowells@redhat.com> | 2019-01-09 17:23:54 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-01-17 15:17:28 +0000 |
commit | 59d49076ae3e6912e6d7df2fd68e2337f3d02036 (patch) | |
tree | 954ec6f394f6788e9f477da2b9944730a1a66750 /fs/afs/inode.c | |
parent | 4882a27cec24319d10f95e978ecc80050e3e3e15 (diff) |
afs: Fix key refcounting in file locking code
Fix the refcounting of the authentication keys in the file locking code.
The vnode->lock_key member points to a key on which it expects to be
holding a ref, but it isn't always given an extra ref, however.
Fixes: 0fafdc9f888b ("afs: Fix file locking")
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/inode.c')
-rw-r--r-- | fs/afs/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 211343831c30..1a4ce07fb406 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c @@ -545,6 +545,8 @@ void afs_evict_inode(struct inode *inode) #endif afs_put_permits(rcu_access_pointer(vnode->permit_cache)); + key_put(vnode->lock_key); + vnode->lock_key = NULL; _leave(""); } |