Linux-Fsdevel Archive on
help / color / mirror / Atom feed
* [PATCH] afs: Fix key ref leak in afs_put_operation()
@ 2020-08-20 13:37 David Howells
  0 siblings, 0 replies; only message in thread
From: David Howells @ 2020-08-20 13:37 UTC (permalink / raw)
  To: torvalds; +Cc: Dave Botsch, dhowells, linux-afs, linux-fsdevel, linux-kernel

The afs_put_operation() function needs to put the reference to the key
that's authenticating the operation.

Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept")
Reported-by: Dave Botsch <>
Signed-off-by: David Howells <>

 fs/afs/fs_operation.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/afs/fs_operation.c b/fs/afs/fs_operation.c
index 24fd163c6323..97cab12b0a6c 100644
--- a/fs/afs/fs_operation.c
+++ b/fs/afs/fs_operation.c
@@ -235,6 +235,7 @@ int afs_put_operation(struct afs_operation *op)
 	afs_put_serverlist(op->net, op->server_list);
 	afs_put_volume(op->net, op->volume, afs_volume_trace_put_put_op);
+	key_put(op->key);
 	return ret;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-20 13:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-20 13:37 [PATCH] afs: Fix key ref leak in afs_put_operation() David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).