public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] svcrdma: Fix possible over population fast_reg_page_list
@ 2015-07-20 17:00 Sagi Grimberg
       [not found] ` <1437411614-29722-1-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Sagi Grimberg @ 2015-07-20 17:00 UTC (permalink / raw)
  To: linux-nfs-u79uwXL29TY76Z2rM5mHXA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Chuck Lever, Steve Wise

When accounting the needed_pages, we need to look into
the page_list->max_page_list_len and not the global
context xprt->sc_frmr_pg_list_len.

Signed-off-by: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
index 2e1348b..b19ffd3 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -244,7 +244,8 @@ int rdma_read_chunk_frmr(struct svcxprt_rdma *xprt,
 
 	ctxt->direction = DMA_FROM_DEVICE;
 	ctxt->frmr = frmr;
-	pages_needed = min_t(int, pages_needed, xprt->sc_frmr_pg_list_len);
+	pages_needed = min_t(int, pages_needed,
+			     frmr->page_list->max_page_list_len);
 	read = min_t(int, pages_needed << PAGE_SHIFT, rs_length);
 
 	frmr->kva = page_address(rqstp->rq_arg.pages[pg_no]);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-20 17:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-20 17:00 [PATCH RFC] svcrdma: Fix possible over population fast_reg_page_list Sagi Grimberg
     [not found] ` <1437411614-29722-1-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-07-20 17:13   ` Chuck Lever
     [not found]     ` <C3FCF5F9-07D6-4A6D-8114-CB700038797E-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-07-20 17:19       ` Sagi Grimberg
2015-07-20 17:27   ` Steve Wise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox