Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1211529

[PATCH 01/14] RDS: restore return value in rds_cmsg_rdma_args()

From Santosh Shilimkar <santosh.shilimkar@oracle.com>
Newsgroups linux.kernel
Subject [PATCH 01/14] RDS: restore return value in rds_cmsg_rdma_args()
Date 2015-08-23 01:00 +0200
Message-ID <q0pVv-7MN-1@gated-at.bofh.it> (permalink)
References <q0pLP-7Ac-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


In rds_cmsg_rdma_args() 'ret' is used by rds_pin_pages() which returns
number of pinned pages on success. And the same value is returned to the
caller of rds_cmsg_rdma_args() on success which is not intended.

Commit f4a3fc03c1d7 ("RDS: Clean up error handling in rds_cmsg_rdma_args")
removed the 'ret = 0' line which broke RDS RDMA mode.

Fix it by restoring the return value on rds_pin_pages() success
keeping the clean-up in place.

Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
---
 net/rds/rdma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 40084d8..6401b50 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -658,6 +658,8 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
 		ret = rds_pin_pages(iov->addr, nr, pages, !op->op_write);
 		if (ret < 0)
 			goto out;
+		else
+			ret = 0;
 
 		rdsdebug("RDS: nr_bytes %u nr %u iov->bytes %llu iov->addr %llx\n",
 			 nr_bytes, nr, iov->bytes, iov->addr);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/14] RDS: Assorted bug fixes Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-08-23 00:50 +0200
  [PATCH 12/14] RDS: make sure rds_send_drop_to properly takes the m_rs_lock Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-08-23 00:50 +0200
  [PATCH 01/14] RDS: restore return value in rds_cmsg_rdma_args() Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-08-23 01:00 +0200
  [PATCH 06/14] RDS: check for congestion updates during rds_send_xmit Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-08-23 01:00 +0200
  Re: [PATCH 00/14] RDS: Assorted bug fixes David Miller <davem@davemloft.net> - 2015-08-25 22:40 +0200

csiph-web