From patchwork Wed Apr 16 18:35:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Wise X-Patchwork-Id: 4003601 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6FE36BFF02 for ; Wed, 16 Apr 2014 18:35:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A8D5C20353 for ; Wed, 16 Apr 2014 18:35:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7026020373 for ; Wed, 16 Apr 2014 18:35:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755973AbaDPSfk (ORCPT ); Wed, 16 Apr 2014 14:35:40 -0400 Received: from smtp.opengridcomputing.com ([72.48.136.20]:57822 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755675AbaDPSfi (ORCPT ); Wed, 16 Apr 2014 14:35:38 -0400 Received: from build.ogc.int (build.ogc.int [10.10.0.2]) by smtp.opengridcomputing.com (Postfix) with ESMTPSA id 782F429E4E; Wed, 16 Apr 2014 13:35:38 -0500 (CDT) From: Steve Wise Subject: [PATCH] xprtrdma: Set LOCAL_WRITE for memory regions with REMOTE_WRITE To: trond.myklebust@primarydata.com Cc: linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org Date: Wed, 16 Apr 2014 13:35:38 -0500 Message-ID: <20140416183538.23742.54560.stgit@build.ogc.int> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The commit below enforces the requirement that MRs with REMOTE_WRITE must also have LOCAL_WRITE: commit 1c636f801615bdfc9b1d46904e8258c7a025670b Author: Eli Cohen Date: Thu Oct 31 15:26:32 2013 +0200 IB/core: Encorce MR access rights rules on kernel consumers Signed-off-by: Steve Wise --- net/sunrpc/xprtrdma/verbs.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 9b038e1..65ce677 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -1637,7 +1637,8 @@ static int rpcrdma_register_default_external(struct rpcrdma_mr_seg *seg, int *nsegs, int writing, struct rpcrdma_ia *ia) { - int mem_priv = (writing ? IB_ACCESS_REMOTE_WRITE : + int mem_priv = (writing ? IB_ACCESS_REMOTE_WRITE | + IB_ACCESS_LOCAL_WRITE : IB_ACCESS_REMOTE_READ); struct rpcrdma_mr_seg *seg1 = seg; struct ib_phys_buf ipb[RPCRDMA_MAX_DATA_SEGS];