projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b1f693
)
RDS: Return -EINVAL if rds_rdma_pages returns an error
author
Andy Grover
<andy.grover@oracle.com>
Thu, 28 Oct 2010 15:40:56 +0000
(15:40 +0000)
committer
David S. Miller
<davem@davemloft.net>
Sat, 30 Oct 2010 23:34:16 +0000
(16:34 -0700)
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@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/rdma.c
patch
|
blob
|
history
diff --git
a/net/rds/rdma.c
b/net/rds/rdma.c
index 0df02c8a853362cbfddfa88f4d3eae3f17b81f62..d0ba2ca3b71457576c95dfe1f070003b6f663944 100644
(file)
--- 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) {