]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: Fix trace-after-put looking at the put connection record
authorDavid Howells <dhowells@redhat.com>
Mon, 7 Oct 2019 09:58:29 +0000 (10:58 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 7 Oct 2019 10:05:05 +0000 (11:05 +0100)
commit9a3fe7b3909eb6d5daeb8d5ec9f1794042c24350
tree378194d440cf62bf8219a3547a0d971906c7f9ab
parent9de5381c1cd9738dc9b7df176181f43dafa73fb2
rxrpc: Fix trace-after-put looking at the put connection record

rxrpc_put_*conn() calls trace_rxrpc_conn() after they have done the
decrement of the refcount - which looks at the debug_id in the connection
record.  But unless the refcount was reduced to zero, we no longer have the
right to look in the record and, indeed, it may be deleted by some other
thread.

Fix this by getting the debug_id out before decrementing the refcount and
then passing that into the tracepoint.

Fixes: 5e42a567bc0e ("rxrpc: Add connection tracepoint and client conn state tracepoint")
Signed-off-by: David Howells <dhowells@redhat.com>
include/trace/events/rxrpc.h
net/rxrpc/call_accept.c
net/rxrpc/conn_client.c
net/rxrpc/conn_object.c
net/rxrpc/conn_service.c