mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
xprtrdma: Prevent infinite loop in rpcrdma_ep_create()
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: 0fc6c4e7bb ("xprtrdma: mind the device's max fast . . .")
Reported-by: Devesh Sharma <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
Tested-by: Devesh Sharma <[email protected]>
Tested-by: Meghana Cheripady <[email protected]>
Tested-by: Veeresh U. Kokatnur <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
This commit is contained in:
parent
805272406a
commit
41f9702896
1 changed files with 3 additions and 2 deletions
|
|
@ -618,9 +618,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue