Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1496568

[PATCH net 03/13] rxrpc: Fix oops on incoming call to serviceless endpoint

From David Howells <dhowells@redhat.com>
Newsgroups linux.kernel
Subject [PATCH net 03/13] rxrpc: Fix oops on incoming call to serviceless endpoint
Date 2016-10-06 12:10 +0200
Message-ID <spdML-79a-75@gated-at.bofh.it> (permalink)
References <spdMJ-79a-3@gated-at.bofh.it>
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903

Show all headers | View raw


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>
---

 net/rxrpc/call_accept.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next 00/13] rxrpc: Fixes David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  [PATCH net 10/13] rxrpc: Return negative error code to kernel  service David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  [PATCH net 03/13] rxrpc: Fix oops on incoming call to serviceless  endpoint David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  [PATCH net 05/13] rxrpc: Fix warning by splitting  rxrpc_send_call_packet() David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  [PATCH net 13/13] rxrpc: Don't request an ACK on the last DATA  packet of a call's Tx phase David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  [PATCH net 07/13] rxrpc: Partially handle OpenAFS's improper  termination of calls David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  Re: [PATCH net-next 00/13] rxrpc: Fixes David Miller <davem@davemloft.net> - 2016-10-07 03:10 +0200

csiph-web