Skip to content
Commit 2757a4dc authored by David Howells's avatar David Howells
Browse files

afs: Fix access after dec in put functions



Reference-putting functions should not access the object being put after
decrementing the refcount unless they reduce the refcount to zero.

Fix a couple of instances of this in afs by copying the information to be
logged by tracepoint to local variables before doing the decrement.

[Fixed a bit in afs_put_server() that I'd missed but Marc caught]

Fixes: 341f741f ("afs: Refcount the afs_call struct")
Fixes: 45218193 ("afs: Trace afs_server usage")
Fixes: 977e5f8e ("afs: Split the usage count on struct afs_server")
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://lore.kernel.org/r/165911278430.3745403.16526310736054780645.stgit@warthog.procyon.org.uk/ # v1
parent c56f9ec8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment