Received: by 10.223.185.116 with SMTP id b49csp6399570wrg; Wed, 28 Feb 2018 08:46:52 -0800 (PST) X-Google-Smtp-Source: AH8x224QQ7l6o1lQVWhsTU1krZADfv8pFJ3N5qw6+wEvV99wjeVBSqA8VxC6ulJbelLHbsHKm2ho X-Received: by 10.98.103.69 with SMTP id b66mr18475766pfc.114.1519836412741; Wed, 28 Feb 2018 08:46:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519836412; cv=none; d=google.com; s=arc-20160816; b=T5CDjukwCZvrn39VU1NLePLxLhHqYzo6BFsnQmvG4mAWqvHKmYZowJBVBJb3RD08tp EGCYaLH6eOZCNPbRSrD0Drh3FG+78jThnHoZB6kueUAYQNNyNCsH5MyfltvQtEmyT5D0 sfMk6dfwg6CKyaQypBfh0pOwc3nepwt8UmjfPd88zDAs0mWR2dvkkbqlF32fraCv9JEf lGVBVeSffBiMulfr43VYhYN1qdBt168Ijz6L5XXkAfB93A09p2kfYwh6M/KEc3rk2+iR M3uekZnotJt1Ahcwq6wMAIQVSgDyFwWD/UtBdWd6JZoeBG2ijUFr+U6jvzi1JoNjsStL S+Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=Yh8ut0H/alZXyDjDEr1ZEPtSxIR1mdZodydQPMincj8=; b=t/79+afwZvpp7gx/mbmf9+uyiDlRanMFrgKz02jnDLcekQl3rMcdI2YRTsuzXnrtO0 3O/TXiu8hu3PY8kEZtSITVfWdFSxL1zjA8EAiGN1k1zodzVVcwgssRoBW4tuDGqJctsg 0SbmILRM4hoj8o0tBSVCD2/impcPjqoJ7E2VlPHXhLTKTNlNmrkyzuT6/b1GIH/tkEeu xD2ec9d3rjcVwC1HK90+m+2WhUUSLu5ZYcCiikYPy9aadB3uM3LOPSRdvFqRmbT6sJR1 9ojRfZzA3N/ejnN5cZRFXHKaOipz9WPg2AT6wxokBZyvWHGVQNFvY9zZfqZxLtbrKYPr HyZQ== 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 j24si1207999pga.711.2018.02.28.08.46.37; Wed, 28 Feb 2018 08:46:52 -0800 (PST) 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 S1753059AbeB1QAT (ORCPT + 99 others); Wed, 28 Feb 2018 11:00:19 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34646 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752543AbeB1QAQ (ORCPT ); Wed, 28 Feb 2018 11:00:16 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yr-0006Xj-B7; Wed, 28 Feb 2018 15:22:29 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yi-0000B6-9A; Wed, 28 Feb 2018 15:22:20 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Bart Van Assche" , "Jason Gunthorpe" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 159/254] IB/srpt: Disable RDMA access by the initiator In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Bart Van Assche commit bec40c26041de61162f7be9d2ce548c756ce0f65 upstream. With the SRP protocol all RDMA operations are initiated by the target. Since no RDMA operations are initiated by the initiator, do not grant the initiator permission to submit RDMA reads or writes to the target. Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe Signed-off-by: Ben Hutchings --- drivers/infiniband/ulp/srpt/ib_srpt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -958,8 +958,7 @@ static int srpt_init_ch_qp(struct srpt_r return -ENOMEM; attr->qp_state = IB_QPS_INIT; - attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ | - IB_ACCESS_REMOTE_WRITE; + attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE; attr->port_num = ch->sport->port; attr->pkey_index = 0;