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: 363deeab6d
("rxrpc: Add connection tracepoint and client conn state tracepoint")
Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
@@ -546,10 +546,10 @@ TRACE_EVENT(rxrpc_peer,
|
||||
);
|
||||
|
||||
TRACE_EVENT(rxrpc_conn,
|
||||
TP_PROTO(struct rxrpc_connection *conn, enum rxrpc_conn_trace op,
|
||||
TP_PROTO(unsigned int conn_debug_id, enum rxrpc_conn_trace op,
|
||||
int usage, const void *where),
|
||||
|
||||
TP_ARGS(conn, op, usage, where),
|
||||
TP_ARGS(conn_debug_id, op, usage, where),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned int, conn )
|
||||
@@ -559,7 +559,7 @@ TRACE_EVENT(rxrpc_conn,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->conn = conn->debug_id;
|
||||
__entry->conn = conn_debug_id;
|
||||
__entry->op = op;
|
||||
__entry->usage = usage;
|
||||
__entry->where = where;
|
||||
|
Reference in New Issue
Block a user