summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-10-06 03:11:49 -0400
committerDavid Howells <dhowells@redhat.com>2016-10-06 03:11:49 -0400
commit7212a57e8eaa2572481398532d7be0c2685362b9 (patch)
tree225fe38d7c4a16d5cb4b03b2f918f9650fe48826 /net
parent19c0dbd5406ddc669ef1516c02c6b0f5a4465628 (diff)
rxrpc: Fix oops on incoming call to serviceless endpoint
If an call comes in to a local endpoint that isn't listening for any incoming calls at the moment, an oops will happen. We need to check that the local endpoint's service pointer isn't NULL before we dereference it. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/rxrpc/call_accept.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/call_accept.c b/net/rxrpc/call_accept.c
index 3cac231d8405..22cd8a18c481 100644
--- a/net/rxrpc/call_accept.c
+++ b/net/rxrpc/call_accept.c
@@ -337,7 +337,7 @@ struct rxrpc_call *rxrpc_new_incoming_call(struct rxrpc_local *local,
337 337
338 /* Get the socket providing the service */ 338 /* Get the socket providing the service */
339 rx = rcu_dereference(local->service); 339 rx = rcu_dereference(local->service);
340 if (service_id == rx->srx.srx_service) 340 if (rx && service_id == rx->srx.srx_service)
341 goto found_service; 341 goto found_service;
342 342
343 trace_rxrpc_abort("INV", sp->hdr.cid, sp->hdr.callNumber, sp->hdr.seq, 343 trace_rxrpc_abort("INV", sp->hdr.cid, sp->hdr.callNumber, sp->hdr.seq,