OSDN Git Service

rxrpc: Fix a missing NULL-pointer check in a trace
authorDavid Howells <dhowells@redhat.com>
Mon, 14 Sep 2020 12:02:58 +0000 (13:02 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 14 Sep 2020 15:18:59 +0000 (16:18 +0100)
commit96a9c425e234aac193afb9da6ca11fafc679c7e2
treed3953d1c998980f4cd78131d235bdab463e150bf
parent456b2f2dc7e585e1a031214c5698f1b00e02448b
rxrpc: Fix a missing NULL-pointer check in a trace

Fix the rxrpc_client tracepoint to not dereference conn to get the cid if
conn is NULL, as it does for other fields.

RIP: 0010:trace_event_raw_event_rxrpc_client+0x7e/0xe0 [rxrpc]
Call Trace:
 rxrpc_activate_channels+0x62/0xb0 [rxrpc]
 rxrpc_connect_call+0x481/0x650 [rxrpc]
 ? wake_up_q+0xa0/0xa0
 ? rxrpc_kernel_begin_call+0x12a/0x1b0 [rxrpc]
 rxrpc_new_client_call+0x2a5/0x5e0 [rxrpc]

Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager")
Reported-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Marc Dionne <marc.dionne@auristor.com>
include/trace/events/rxrpc.h