aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-05-11 23:21:35 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-06-21 04:01:44 +0900
commit97d8137763df271fb65c01b3b9e4db0202129ac7 (patch)
tree1d284b1d54995ccecb2467d4654da445a8a11cdd
parent5167bb2a074497fba3a3991f8dcc4f406d46dda4 (diff)
downloadlinux-97d8137763df271fb65c01b3b9e4db0202129ac7.tar.gz
afs: Fix the handling of CB.InitCallBackState3 to find the server by UUID
[ Upstream commit 001ab5a67ee5d191c64aebf4b4ef8c7a0dcfd2bc ] Fix the handling of the CB.InitCallBackState3 service call to find the record of a server that we're using by looking it up by the UUID passed as the parameter rather than by its address (of which it might have many, and which may change). Fixes: c35eccb1f614 ("[AFS]: Implement the CB.InitCallBackState3 operation.") Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/afs/cmservice.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c
index 41e277f57b20f5..c0b53bfef49048 100644
--- a/fs/afs/cmservice.c
+++ b/fs/afs/cmservice.c
@@ -341,7 +341,6 @@ static int afs_deliver_cb_init_call_back_state(struct afs_call *call)
*/
static int afs_deliver_cb_init_call_back_state3(struct afs_call *call)
{
- struct sockaddr_rxrpc srx;
struct afs_server *server;
struct afs_uuid *r;
unsigned loop;
@@ -398,8 +397,9 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call)
/* we'll need the file server record as that tells us which set of
* vnodes to operate upon */
- rxrpc_kernel_get_peer(call->net->socket, call->rxcall, &srx);
- server = afs_find_server(call->net, &srx);
+ rcu_read_lock();
+ server = afs_find_server_by_uuid(call->net, call->request);
+ rcu_read_unlock();
if (!server)
return -ENOTCONN;
call->cm_server = server;