All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Steve Wise" <swise@opengridcomputing.com>
To: <gregkh@linuxfoundation.org>, <bfields@redhat.com>,
	<chuck.lever@oracle.com>
Cc: <stable@vger.kernel.org>
Subject: RE: FAILED: patch "[PATCH] svcrdma: handle rdma read with a non-zero initial page offset" failed to apply to 4.1-stable tree
Date: Mon, 19 Oct 2015 09:59:02 -0500	[thread overview]
Message-ID: <001801d10a7e$b16999e0$143ccda0$@opengridcomputing.com> (raw)
In-Reply-To: <1445128019150223@kroah.com>


> -----Original Message-----
> From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> Sent: Saturday, October 17, 2015 7:27 PM
> To: swise@opengridcomputing.com; bfields@redhat.com; chuck.lever@oracle.com
> Cc: stable@vger.kernel.org
> Subject: FAILED: patch "[PATCH] svcrdma: handle rdma read with a non-zero initial page offset" failed to apply to 4.1-stable tree
> 
> 
> The patch below does not apply to the 4.1-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
> 
> thanks,
> 
> greg k-h
> 

Hey Greg, I submitted the backport patch to linux-stable. 

Thanks,

Steve.

> ------------------ original commit in Linus's tree ------------------
> 
> >From c91aed9896946721bb30705ea2904edb3725dd61 Mon Sep 17 00:00:00 2001
> From: Steve Wise <swise@opengridcomputing.com>
> Date: Mon, 28 Sep 2015 16:46:06 -0500
> Subject: [PATCH] svcrdma: handle rdma read with a non-zero initial page offset
> 
> The server rdma_read_chunk_lcl() and rdma_read_chunk_frmr() functions
> were not taking into account the initial page_offset when determining
> the rdma read length.  This resulted in a read who's starting address
> and length exceeded the base/bounds of the frmr.
> 
> The server gets an async error from the rdma device and kills the
> connection, and the client then reconnects and resends.  This repeats
> indefinitely, and the application hangs.
> 
> Most work loads don't tickle this bug apparently, but one test hit it
> every time: building the linux kernel on a 16 core node with 'make -j
> 16 O=/mnt/0' where /mnt/0 is a ramdisk mounted via NFSRDMA.
> 
> This bug seems to only be tripped with devices having small fastreg page
> list depths.  I didn't see it with mlx4, for instance.
> 
> Fixes: 0bf4828983df ('svcrdma: refactor marshalling logic')
> Signed-off-by: Steve Wise <swise@opengridcomputing.com>
> Tested-by: Chuck Lever <chuck.lever@oracle.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
> 
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> index cb5174284074..5f6ca47092b0 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> @@ -136,7 +136,8 @@ int rdma_read_chunk_lcl(struct svcxprt_rdma *xprt,
>  	ctxt->direction = DMA_FROM_DEVICE;
>  	ctxt->read_hdr = head;
>  	pages_needed = min_t(int, pages_needed, xprt->sc_max_sge_rd);
> -	read = min_t(int, pages_needed << PAGE_SHIFT, rs_length);
> +	read = min_t(int, (pages_needed << PAGE_SHIFT) - *page_offset,
> +		     rs_length);
> 
>  	for (pno = 0; pno < pages_needed; pno++) {
>  		int len = min_t(int, rs_length, PAGE_SIZE - pg_off);
> @@ -235,7 +236,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);
> -	read = min_t(int, pages_needed << PAGE_SHIFT, rs_length);
> +	read = min_t(int, (pages_needed << PAGE_SHIFT) - *page_offset,
> +		     rs_length);
> 
>  	frmr->kva = page_address(rqstp->rq_arg.pages[pg_no]);
>  	frmr->direction = DMA_FROM_DEVICE;


      reply	other threads:[~2015-10-19 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-18  0:26 FAILED: patch "[PATCH] svcrdma: handle rdma read with a non-zero initial page offset" failed to apply to 4.1-stable tree gregkh
2015-10-19 14:59 ` Steve Wise [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001801d10a7e$b16999e0$143ccda0$@opengridcomputing.com' \
    --to=swise@opengridcomputing.com \
    --cc=bfields@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.