From: David Howells Date: Thu, 6 Oct 2016 07:11:49 +0000 (+0100) Subject: rxrpc: Fix oops on incoming call to serviceless endpoint X-Git-Tag: v4.13~2115^2~12^2~10 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=7212a57e8eaa2572481398532d7be0c2685362b9;p=mirror_ubuntu-bionic-kernel.git 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 --- 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, /* Get the socket providing the service */ rx = rcu_dereference(local->service); - if (service_id == rx->srx.srx_service) + if (rx && service_id == rx->srx.srx_service) goto found_service; trace_rxrpc_abort("INV", sp->hdr.cid, sp->hdr.callNumber, sp->hdr.seq,