[3.16.y-ckt stable] Patch "xprtrdma: Prevent infinite loop in rpcrdma_ep_create()" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Wed May 6 09:53:01 UTC 2015
This is a note to let you know that I have just added a patch titled
xprtrdma: Prevent infinite loop in rpcrdma_ep_create()
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt11.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 2609f50478cb60865ea8f3aacaa2e9941f5bda28 Mon Sep 17 00:00:00 2001
From: Chuck Lever <chuck.lever at oracle.com>
Date: Mon, 30 Mar 2015 14:34:12 -0400
Subject: xprtrdma: Prevent infinite loop in rpcrdma_ep_create()
commit 41f97028969e4c88efa5fcf58bc6125210413a6d upstream.
If a provider advertizes a zero max_fast_reg_page_list_len, FRWR
depth detection loops forever. Instead of just failing the mount,
try other memory registration modes.
Fixes: 0fc6c4e7bb28 ("xprtrdma: mind the device's max fast . . .")
Reported-by: Devesh Sharma <Devesh.Sharma at Emulex.Com>
Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
Tested-by: Devesh Sharma <Devesh.Sharma at Emulex.Com>
Tested-by: Meghana Cheripady <Meghana.Cheripady at Emulex.Com>
Tested-by: Veeresh U. Kokatnur <veereshuk at chelsio.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker at Netapp.com>
[ luis: backported to 3.16:
- devattr struct isn't a pointer ]
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
net/sunrpc/xprtrdma/verbs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 13dbd1c389ff..9ec12f834c43 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -541,9 +541,10 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg)
if (memreg == RPCRDMA_FRMR) {
/* Requires both frmr reg and local dma lkey */
- if ((devattr.device_cap_flags &
+ if (((devattr.device_cap_flags &
(IB_DEVICE_MEM_MGT_EXTENSIONS|IB_DEVICE_LOCAL_DMA_LKEY)) !=
- (IB_DEVICE_MEM_MGT_EXTENSIONS|IB_DEVICE_LOCAL_DMA_LKEY)) {
+ (IB_DEVICE_MEM_MGT_EXTENSIONS|IB_DEVICE_LOCAL_DMA_LKEY)) ||
+ (devattr.max_fast_reg_page_list_len == 0)) {
dprintk("RPC: %s: FRMR registration "
"not supported by HCA\n", __func__);
memreg = RPCRDMA_MTHCAFMR;
More information about the kernel-team
mailing list