summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/conn_client.c
diff options
context:
space:
mode:
authorDavid Howells2016-08-24 15:31:43 +0200
committerDavid Howells2016-08-24 16:15:59 +0200
commitdf5d8bf70f64a2ee34234553eb215418dbc4c8f3 (patch)
tree866b273fb3eb256464fe6d10185b63054601df5a /net/rxrpc/conn_client.c
parentrxrpc: Fix conn-based retransmit (diff)
downloadkernel-qcow2-linux-df5d8bf70f64a2ee34234553eb215418dbc4c8f3.tar.gz
kernel-qcow2-linux-df5d8bf70f64a2ee34234553eb215418dbc4c8f3.tar.xz
kernel-qcow2-linux-df5d8bf70f64a2ee34234553eb215418dbc4c8f3.zip
rxrpc: Make /proc/net/rxrpc_calls safer
Make /proc/net/rxrpc_calls safer by stashing a copy of the peer pointer in the rxrpc_call struct and checking in the show routine that the peer pointer, the socket pointer and the local pointer obtained from the socket pointer aren't NULL before we use them. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_client.c')
-rw-r--r--net/rxrpc/conn_client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c
index fc32cc67c2de..2d43c99e5360 100644
--- a/net/rxrpc/conn_client.c
+++ b/net/rxrpc/conn_client.c
@@ -280,6 +280,7 @@ attached:
found_channel:
_debug("found chan");
call->conn = conn;
+ call->peer = rxrpc_get_peer(conn->params.peer);
call->cid = conn->proto.cid | chan;
call->call_id = ++conn->channels[chan].call_counter;
conn->channels[chan].call_id = call->call_id;