[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1288316459-4679-3-git-send-email-andy.grover@oracle.com>
Date: Thu, 28 Oct 2010 18:40:56 -0700
From: Andy Grover <andy.grover@...cle.com>
To: netdev@...r.kernel.org
Cc: rds-devel@....oracle.com
Subject: [PATCH 2/5] RDS: Return -EINVAL if rds_rdma_pages returns an error
rds_cmsg_rdma_args would still return success even if rds_rdma_pages
returned an error (or overflowed).
Signed-off-by: Andy Grover <andy.grover@...cle.com>
---
net/rds/rdma.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 0df02c8..d0ba2ca 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -554,8 +554,10 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
}
nr_pages = rds_rdma_pages(args);
- if (nr_pages < 0)
+ if (nr_pages < 0) {
+ ret = -EINVAL;
goto out;
+ }
pages = kcalloc(nr_pages, sizeof(struct page *), GFP_KERNEL);
if (!pages) {
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists