Message ID | 22a7b1b4-1a65-1a92-ef77-6f404de278fd@sandisk.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-rdma-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0D47C601C2 for <patchwork-linux-rdma@patchwork.kernel.org>; Mon, 26 Sep 2016 19:59:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F292A28E2E for <patchwork-linux-rdma@patchwork.kernel.org>; Mon, 26 Sep 2016 19:59:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E75DD28E30; Mon, 26 Sep 2016 19:59:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5029128E2E for <patchwork-linux-rdma@patchwork.kernel.org>; Mon, 26 Sep 2016 19:59:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034765AbcIZT7E (ORCPT <rfc822;patchwork-linux-rdma@patchwork.kernel.org>); Mon, 26 Sep 2016 15:59:04 -0400 Received: from mail-dm3nam03on0080.outbound.protection.outlook.com ([104.47.41.80]:62572 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1033024AbcIZT7D (ORCPT <rfc822;linux-rdma@vger.kernel.org>); Mon, 26 Sep 2016 15:59:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=fy274OGSZS0a5gZVVK7eOmD22fop5ByKFgV95HnS5/s=; b=NexNEofa3q15pmdniNV6WxELP7tR7JTN+8DXjzuNcJ8bHpQ5+/UGd9S8vFPwcB3r/uwx0EZXcdtrzVdxjY++vmZ95Kb2gdTg2OIzMwG01fr9bj6XRWLKvx9rMPe7cGPWvRa+MI+uRylEYCMV503snetVMtxcOQHIQLRF344GonE= Received: from BLUPR0201CA0002.namprd02.prod.outlook.com (10.163.116.12) by DM5PR02MB2748.namprd02.prod.outlook.com (10.175.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Mon, 26 Sep 2016 19:59:00 +0000 Received: from BN1BFFO11FD022.protection.gbl (2a01:111:f400:7c10::1:109) by BLUPR0201CA0002.outlook.office365.com (2a01:111:e400:52e7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5 via Frontend Transport; Mon, 26 Sep 2016 19:59:00 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BN1BFFO11FD022.mail.protection.outlook.com (10.58.144.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.5 via Frontend Transport; Mon, 26 Sep 2016 19:58:59 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 63.8C.26959.AAB79E75; Mon, 26 Sep 2016 12:48:58 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.301.0; Mon, 26 Sep 2016 12:58:49 -0700 X-AuditID: 0ac94369-b97ff7000001694f-02-57e97baa725b Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id B3.5F.02783.9FD79E75; Mon, 26 Sep 2016 12:58:49 -0700 (PDT) Subject: [PATCH 2/2] IB/srp: Avoid that certain sg-lists trigger an infinite loop with FMR To: Doug Ledford <dledford@redhat.com> References: <c5bd10df-225d-df4c-c765-97551348dbbd@sandisk.com> CC: Alex Estrin <alex.estrin@intel.com>, "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org> From: Bart Van Assche <bart.vanassche@sandisk.com> Message-ID: <22a7b1b4-1a65-1a92-ef77-6f404de278fd@sandisk.com> Date: Mon, 26 Sep 2016 12:58:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <c5bd10df-225d-df4c-c765-97551348dbbd@sandisk.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRmVeSWpSXmKPExsXCddJ5ke6q6pfhBhc2mlhcePqdyeLl+Q+s Fs8O9bI4MHss3vOSyeP9vqtsHp83yQUwR3HZpKTmZJalFunbJXBldG7/wFKwlrdiz4mzTA2M t7m6GDk5JARMJN4+O8HaxcjFISSwlEli/4MHjBDODkaJ3ndtjDBVK640MUFVMUrMv7SODSQh LBAj8Wb+JxYQW0RATWLTq0XsXYwcQEV2Eqcum4CYzAIpEj9bSkAq2ASMJL69nwlWzQtUcevI HRaQEhY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KUWIozEg21mIuKEwG+cXDF6wEAAA== X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(5660300001)(586003)(81166006)(81156014)(64126003)(6916009)(305945005)(8676002)(92566002)(356003)(83506001)(2270400002)(626004)(36756003)(69596002)(68736007)(19580405001)(19580395003)(50466002)(7846002)(110136003)(65826007)(86362001)(2906002)(4326007)(87936001)(50986999)(23676002)(229853001)(65806001)(53416004)(2950100002)(65956001)(230700001)(31696002)(11100500001)(47776003)(76176999)(189998001)(54356999)(31686004)(33646002)(4001350100001)(97736004)(8936002)(106466001)(77096005); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR02MB2748; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD022; 1:NPElzaNl+3ihe2T0aeXcIOiWnErlO093Ax/n9CLBDhPSOrkyO9Tpg5wxc/2J08JgiyFKQ5NfFjv4TKrojBjP0sKV/6UuGGyh7AvcBFTHxjYoLbt0kgy1LPozxj6tsyky9RlkMUn0rEUM/CACn3VGcTCAhXvSyMYB/NI4CfoJaLJ22smiBo9iQvBlK/K9YxWHV5nGST+yMR9mrrPJCt+92lqwZvO5CpLUYP5BiM+5sf4lA1V82btShFGv4qHFF8Fw6b1Vbqs+XrBUQWWwlTNHuQODPNK6BKc0FhQ0kiuIi6E4yxA4uhJJlfeuHJnbbLQqpvrZ1BDHImZk3UbHshXT0Fo2t4zAO6ncABVfx/wlpByv3SekLEphIx9OQq1pgQaLYfLV8nSHu47thA/bE2cj60mOqJrULll/psD72EJIXRTi3mIc87YLTMdlz3uXRkH6gLR4aQY/iEJlDstqvU2HyEK6wXRfWKgyHNSvygAYawDGftNaMueNN24WYTaRW6ZYagu+Jo4//IhOC5YI31wUWw== X-MS-Office365-Filtering-Correlation-Id: 6e6b7aa7-afbd-436f-567a-08d3e6478ec7 X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2748; 2:iAUVASV9eCAy14FNkpmNG2ZSDbWM8ISb6TQ4FnOHF6/5tXpUSSj9j6w+GEEdKUDsHMrokj/O3rh+689YwL9U5ccsAn8yr+NLbkciXqKPsvE4im4e4N9zzyCDkPZZkbEJ+bjhFx2xhfSq4R94+ZL6NnFfra44YkM15s9ywoZxPQarbBUE4v7QQC+rgzMT6SEv; 3:9y2W1LITMYwbrENl33CUrTnuh7j2M829C8vD49HXpfoRGu3rhfDf7FUWvf31G4RHY3LQhaj6WNB4HeARr2bTNGZSrNL4RSlAUw2z9yT1sYCzMM88LOrvjhOJt+0fsPNrcSYXDAGGRpW0NZeWOGhyqv/LqjIhkeTxT9iCmediH9wbp+dZBkqlqgOjJf7sR0li9oLWAwaszzW9+HE46/jk2sMEg/9b8KjAHLQStcS3rxkUF+CdLRYEkv0boJ6AAzA6zvrig8j5tRCe1wFGbTsjhA==; 25:UEFPRU8SrS1RJVGcJ9nPWmwHOP9r3UBiTYXRTk0pHc0m341XK4imh0NESCr1LgmA0vrEufqYYPkPNrLcCQxCkI+iwp6OHrp+WtHnVF4ifwse6Y4jL0fV2cglhDe44pyev2Z8JgtjvgY7AgnZm4xjqz6D7e5wQVo6UBmYZnMGi2ENgnCHzQK4+HgpoMWkGOt9eDOBGr8JWrgy5elAAOzmI4XcCqI7PLTHNapXriTJbSrMHsyx0o24C/i1yJiRt90FwMJgybCEhbZPsE38Dn3wOIXnAKivA1z+5Q2AXAgnyOGCnDs2+uCR2SnHmYHMhW7P6q25BNarra5MPz+eS+EegsOJvPDyNiK9FOss5ZvGhaXB0JeUfGffXyM2KRqjpDPbDBcDqwNoxOAXxwTMHGC/hQ== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:DM5PR02MB2748; X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2748; 31:kSsrplcPddk38aYh4AW4tkNZU1QbWdAD+Xj6JqzaCnOPyUSirIyBpJL63n0pr33FXo8fBRCiRYZdk4pwy2ybdYvGJmQrjtrIOJJk0F3T36jWNSlEZrMkmTX2X7l5B/SaNqKLHwLgF8OEdW3PWvDblU+gnFLA4bjSSjU72k4X4PfdPDhAa0wf9ydSZO+JP4xJD2nAA0DhTWMc3fR/XSC6VevJIrgIteWi9IPO0y9yGsM=; 20:BaKD6wHGondUOBlSewTlI+/llVorA0UkgsQUtgmBmhrDItU+CUccT+sQYjA/yuCUoyI3C603ctk9bBP9n6tT/50z/CJB/0NO3rf0DeHEU2BYxmY4kwh0tDjgkyy6mDy+R5xl+Vjxbi5kJNKcGPAz/n50ndm3lHm8npY26VCpuozUhQc2/4k6ZpWxxmz0MZfP0rYMOGBHC86gR/8sCbZlj4jPD1EHkLCR3mLO0YcjriPHSl00MsywNuLaFQHsXdtsxQUydZ+PpVV1SLX19MdHos0JQbwnjVx8h0/jeb7D7+OpIMQJFKT5vxHvQ5SMYP3l8qFexdBsnQ5pvuKR1FKrprV5TZtLTzqvVGOKcYXboDdFuM8bKL8D9nf36KWDLNT9C+PEyy4r2UOYbhc95R2cDWQYsTFnWQF9jyLaYodYTGG2uYPf8xHBjUlpWtV1UDmTwAMZuEEnQBIaoGh5EL6FxOvqZkfK6XrBLb3z+TxDR7l7v9N7jYsw7F9nVddQ9ezz X-Microsoft-Antispam-PRVS: <DM5PR02MB27488815D06F154B7BE3073481CD0@DM5PR02MB2748.namprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(42932892334569)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13018025)(13016025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:DM5PR02MB2748; BCL:0; PCL:0; RULEID:; SRVR:DM5PR02MB2748; X-Microsoft-Exchange-Diagnostics: 1; DM5P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d67g==; 24:AaOkhMosW3Xkd2xLZRezKGuANhT2qfWM3XY2nx6n1L1updJrFDqRxOYEQ+uUulGTjOgZUt9uIUSicT9AySeM+0nKUheselyZurl9xEPq1fY=; 7:j17x2e9rgZ+Sjj4N8FX8i2tfHp7LOHsn9pyW81ix3JArpWTFHGi9EUxyWF+QQzKRjlqeec2iC5Cn3UB0FA8v37mOq26rEDps+4qHIlCaxQgPtlK0L6pRuRUDKkyVCwhRHussQwybe0IjQnEcYvUpS0E9tHVqqVGK+PKojz+l6gVwWgZmJTRIR/MVDzepNhOXbNb5grwAL+Tz+3iEITT/Cr61KrC0p+7dk0bRp71bumJ1bC2vi8rlqoO46fJyf5MN3UEeiyGIOSQK3oVi98zinunNg1CgZcrFVA4Bpm23od1iJKGsvbGZtmIczn9Z65Rm SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2748; 20:JxMaeqW9Cw8dPWUAjjVZCxgt8G5F4Bzm7nDPnkMiPv3UEK53koY/um8aVivbj0oOxqQFXJtWw6X8LhLECi0eAcWAA2V0dqcJnnyfPH7XcVnXwISj5Mq8ugB9UiwK16XCbaafMXtkoF5HBe3pqPuC2UzOlv8x29OivtiGCoOFRWBxdc3yoGMK0hocMtGM3XZrKBEK5YOcj3gfbBfI9VKtNSoEnuEXlUQltsondt0CS+SlD4thgva+nRFRteIpfz06 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2016 19:58:59.8122 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB2748 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: <linux-rdma.vger.kernel.org> X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 06bb7a905635..29ec5e2f247e 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1416,7 +1416,9 @@ static int srp_map_sg_entry(struct srp_map_state *state, while (dma_len) { unsigned offset = dma_addr & ~dev->mr_page_mask; - if (state->npages == dev->max_pages_per_mr || offset != 0) { + + if (state->npages == dev->max_pages_per_mr || + (state->npages > 0 && offset != 0)) { ret = srp_map_finish_fmr(state, ch); if (ret) return ret; @@ -1433,12 +1435,12 @@ static int srp_map_sg_entry(struct srp_map_state *state, } /* - * If the last entry of the MR wasn't a full page, then we need to + * If the end of the MR is not on a page boundary then we need to * close it out and start a new one -- we can only merge at page * boundaries. */ ret = 0; - if (len != dev->mr_page_size) + if ((dma_addr & ~dev->mr_page_mask) != 0) ret = srp_map_finish_fmr(state, ch); return ret; }
Avoid that mapping an sg-list in which the first element has a non-zero offset triggers an infinite loop when using FMR. This patch makes the FMR mapping code similar to that of ib_sg_to_pages(). Note: older Mellanox HCAs do not support non-zero offsets for FMR. See also commit 8c4037b501ac ("IB/srp: always avoid non-zero offsets into an FMR"). Reported-by: Alex Estrin <alex.estrin@intel.com> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: <stable@vger.kernel.org> --- drivers/infiniband/ulp/srp/ib_srp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)