diff options
author | David Howells <dhowells@redhat.com> | 2019-10-07 12:58:29 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-10-07 13:05:05 +0300 |
commit | 4c1295dccc0afe0905b6ca4c62ade7f2406f2cfb (patch) | |
tree | 378194d440cf62bf8219a3547a0d971906c7f9ab /net/rxrpc/conn_service.c | |
parent | 55f6c98e3674ce16038a1949c3f9ca5a9a99f289 (diff) | |
download | linux-4c1295dccc0afe0905b6ca4c62ade7f2406f2cfb.tar.xz |
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: 363deeab6d0f ("rxrpc: Add connection tracepoint and client conn state tracepoint")
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_service.c')
-rw-r--r-- | net/rxrpc/conn_service.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/conn_service.c b/net/rxrpc/conn_service.c index b30e13f6d95f..123d6ceab15c 100644 --- a/net/rxrpc/conn_service.c +++ b/net/rxrpc/conn_service.c @@ -134,7 +134,7 @@ struct rxrpc_connection *rxrpc_prealloc_service_connection(struct rxrpc_net *rxn list_add_tail(&conn->proc_link, &rxnet->conn_proc_list); write_unlock(&rxnet->conn_lock); - trace_rxrpc_conn(conn, rxrpc_conn_new_service, + trace_rxrpc_conn(conn->debug_id, rxrpc_conn_new_service, atomic_read(&conn->usage), __builtin_return_address(0)); } |