Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3692989imm; Mon, 18 Jun 2018 02:25:07 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIbgWmdrZmMQNWVNqJqJXs4tiyRpMPSRudbK4ZnmAkfC5fqA3sMTY0KarFLcJqZ+VE5T1uA X-Received: by 2002:a17:902:9f84:: with SMTP id g4-v6mr13289793plq.339.1529313907730; Mon, 18 Jun 2018 02:25:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529313907; cv=none; d=google.com; s=arc-20160816; b=cUxORGiIvIiqq9r1mxpwcnJPlDN0k57O5iPrMOmPjY/OqTM+w633J5+QKoroG9wfqA 0/4odnfkFSJ4wiKQccdlzUe8zFumooY3GuhaKt8NXiTsF0edJTw23cLiJgYarx6yudzD n5NJT33UPKIzNRMrALFUFsbsUN2HYMJi3j19aTAPv1PcCvv0lVf3PLz6qYjVt8arR5kv 7Gaiy3P9q9JyosVfYHz4SVyZ1oyqBgPYBoDDcXYhgzXu+KmzlpGQqRkISY/U54lI5Ypi XitONkcAxsFL9zqr/SQpvEC6CBL7jRENlZ0tgIVr9OGP0OgOECnqbV7/rheIqLkDHCvU mmMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Hp7kKWtgSalvUzgw6H0X64r4eICC71Bti2ocFmul2T4=; b=zdC2ajbFyF5MDcKvwufXxRNUfmZ4CyxlCSIYgu4YlaGEU8AG110XORNxEjkPTsC9/N t7Uek6HAkwrSlmAM0lIKLRLgqDL3UFAKFW0JAAOU0cmr/QFTuBCcY3RgRgOOxeFmaYr3 k6aVBoisedBKT7NEJA/uRdhkK2kCQHSfELv//IVtHbo2b9xCN/oeN//USbgXJ2VFYbqF 0FGicmFT1TZ8nW0EyK8dERkPYTgIWJBBYvylG7TzBtzN0Mwg5v7cJGGNJ5VHrfbJd3hh Q7KtsExkRYh1glgxcM7ant/L80tty+iol8BsqKVVDMH2Pb31ZJZtdP4Nnvqmi9Xs06G3 xbGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 18-v6si14901276pfr.242.2018.06.18.02.24.54; Mon, 18 Jun 2018 02:25:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966481AbeFRJXK (ORCPT + 99 others); Mon, 18 Jun 2018 05:23:10 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57546 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966389AbeFRI1J (ORCPT ); Mon, 18 Jun 2018 04:27:09 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 71AF1C7A; Mon, 18 Jun 2018 08:27:08 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Sasha Levin Subject: [PATCH 4.16 253/279] afs: Fix the handling of CB.InitCallBackState3 to find the server by UUID Date: Mon, 18 Jun 2018 10:13:58 +0200 Message-Id: <20180618080619.211203367@linuxfoundation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618080608.851973560@linuxfoundation.org> References: <20180618080608.851973560@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Howells [ 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 Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/afs/cmservice.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -341,7 +341,6 @@ static int afs_deliver_cb_init_call_back */ 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 /* 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;