Skip to contentSkip to conversation

FAILED: patch "[PATCH] xprtrdma: Return -ENOBUFS when no pages are available" failed to apply to 4.9-stable tree

PATCH [email protected] 2 participants 3 messages Jul 1, 2018 – Jul 23, 2018

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.9-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 <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From a8f688ec437dc2045cc8f0c89fe877d5803850da Mon Sep 17 00:00:00 2001

From: Chuck Lever <[email protected]>
Date: Fri, 4 May 2018 15:35:46 -0400
Subject: [PATCH] xprtrdma: Return -ENOBUFS when no pages are available

The use of -EAGAIN in rpcrdma_convert_iovs() is a latent bug: the transport never calls xprt_write_space() when more pages become available. -ENOBUFS will trigger the correct "delay briefly and call again" logic.

Fixes 7a89f9c626e3 ("xprtrdma: Honor ->send_request API contract")
net/sunrpc/xprtrdma/rpc_rdma.c +1 -1
index d676106295ff..1d7857919d3d 100644
@@ -231,7 +231,7 @@ rpcrdma_convert_iovs(struct rpcrdma_xprt *r_xprt, struct xdr_buf *xdrbuf,
 			 */
 			*ppages = alloc_page(GFP_ATOMIC);
 			if (!*ppages)
-				return -EAGAIN;
+				return -ENOBUFS;
 		}
 		seg->mr_page = *ppages;
 		seg->mr_offset = (char *)page_base;
#1 lore raw

Hi Greg,

Quoted 5 lines · On Sun, Jul 01, 2018 at 11:52:35AM +0200, [email protected] wrote:

The patch below does not apply to the 4.9-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 <[email protected]>.

The attached backported patch should apply to 4.9-stable.

--
Regards
Sudip

Quoted 1 line

From 9562dcbaa81ad0853f0971e050cc9972c7af3d40 Mon Sep 17 00:00:00 2001

From: Chuck Lever <[email protected]>
Date: Fri, 4 May 2018 15:35:46 -0400
Subject: [PATCH] xprtrdma: Return -ENOBUFS when no pages are available

commit a8f688ec437dc2045cc8f0c89fe877d5803850da upstream

The use of -EAGAIN in rpcrdma_convert_iovs() is a latent bug: the transport never calls xprt_write_space() when more pages become available. -ENOBUFS will trigger the correct "delay briefly and call again" logic.

Fixes 7a89f9c626e3 ("xprtrdma: Honor ->send_request API contract")
---
 net/sunrpc/xprtrdma/rpc_rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sunrpc/xprtrdma/rpc_rdma.c +1 -1
index f57c9f0ab8f9..0287734f126f 100644
@@ -229,7 +229,7 @@ rpcrdma_convert_iovs(struct rpcrdma_xprt *r_xprt, struct xdr_buf *xdrbuf,
 			/* alloc the pagelist for receiving buffer */
 			ppages[p] = alloc_page(GFP_ATOMIC);
 			if (!ppages[p])
-				return -EAGAIN;
+				return -ENOBUFS;
 		}
 		seg[n].mr_page = ppages[p];
 		seg[n].mr_offset = (void *)(unsigned long) page_base;
Signature · 1 line
2.11.0
author maintainer
#2 lore raw
Quoted 10 lines · Sudip Mukherjee

Hi Greg,

Quoted 5 lines · On Sun, Jul 01, 2018 at 11:52:35AM +0200, [email protected] wrote:

The patch below does not apply to the 4.9-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 <[email protected]>.

The attached backported patch should apply to 4.9-stable.

Now applied, thanks.

greg k-h