summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/input.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-07 16:28:54 +0200
committerDavid Howells <dhowells@redhat.com>2016-09-07 16:30:22 +0200
commit8b7fac50ab7f2668c43795c135025c472922a344 (patch)
tree9c2fe229af8e976518911b2b38576db84dc05753 /net/rxrpc/input.c
parentrxrpc: Cache the security index in the rxrpc_call struct (diff)
downloadlinux-8b7fac50ab7f2668c43795c135025c472922a344.tar.xz
linux-8b7fac50ab7f2668c43795c135025c472922a344.zip
rxrpc: Pass the connection pointer to rxrpc_post_packet_to_call()
Pass the connection pointer to rxrpc_post_packet_to_call() as the call might get disconnected whilst we're looking at it, but the connection pointer determined by rxrpc_data_read() is guaranteed by RCU for the duration of the call. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/input.c')
-rw-r--r--net/rxrpc/input.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 9242fefd7f40..52da4373131f 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -497,7 +497,8 @@ protocol_error:
* post an incoming packet to the appropriate call/socket to deal with
* - must get rid of the sk_buff, either by freeing it or by queuing it
*/
-static void rxrpc_post_packet_to_call(struct rxrpc_call *call,
+static void rxrpc_post_packet_to_call(struct rxrpc_connection *conn,
+ struct rxrpc_call *call,
struct sk_buff *skb)
{
struct rxrpc_skb_priv *sp;
@@ -558,7 +559,7 @@ resend_final_ack:
dead_call:
if (sp->hdr.type != RXRPC_PACKET_TYPE_ABORT) {
skb->priority = RX_CALL_DEAD;
- rxrpc_reject_packet(call->conn->params.local, skb);
+ rxrpc_reject_packet(conn->params.local, skb);
goto unlock;
}
free_unlock:
@@ -754,7 +755,7 @@ void rxrpc_data_ready(struct sock *sk)
goto cant_route_call;
rxrpc_see_call(call);
- rxrpc_post_packet_to_call(call, skb);
+ rxrpc_post_packet_to_call(conn, call, skb);
goto out_unlock;
}