aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-09-18 09:42:25 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-19 14:59:43 -0400
commit9b9d2e00bfa592aceda7b43da76c670df61faa97 (patch)
tree8412e35fd4e379c4075e09a8f23c245663f91e59 /net/rds
parent0746556beab1a57f1afb5c9d6f393d98528ce682 (diff)
rds: signedness bug
In the original code if the copy_from_user() fails in rds_rdma_pages() then the error handling fails and we get a stack trace from kmalloc(). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/rdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 48064673fc76..1a41debca1ce 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -522,7 +522,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
522 struct rds_rdma_args *args; 522 struct rds_rdma_args *args;
523 struct rds_iovec vec; 523 struct rds_iovec vec;
524 struct rm_rdma_op *op = &rm->rdma; 524 struct rm_rdma_op *op = &rm->rdma;
525 unsigned int nr_pages; 525 int nr_pages;
526 unsigned int nr_bytes; 526 unsigned int nr_bytes;
527 struct page **pages = NULL; 527 struct page **pages = NULL;
528 struct rds_iovec __user *local_vec; 528 struct rds_iovec __user *local_vec;