summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/conn_client.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-08-24 14:31:43 +0100
committerDavid Howells <dhowells@redhat.com>2016-08-24 15:15:59 +0100
commitdf5d8bf70f64a2ee34234553eb215418dbc4c8f3 (patch)
tree866b273fb3eb256464fe6d10185b63054601df5a /net/rxrpc/conn_client.c
parent2266ffdef5737fdfa96005204fc5606dbd559956 (diff)
downloadlinux-stable-df5d8bf70f64a2ee34234553eb215418dbc4c8f3.tar.gz
linux-stable-df5d8bf70f64a2ee34234553eb215418dbc4c8f3.tar.bz2
linux-stable-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;