summaryrefslogtreecommitdiff
path: root/net/rds/rdma.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-09-18 17:42:25 +0400
committerDavid S. Miller <davem@davemloft.net>2010-09-19 22:59:43 +0400
commit9b9d2e00bfa592aceda7b43da76c670df61faa97 (patch)
tree8412e35fd4e379c4075e09a8f23c245663f91e59 /net/rds/rdma.c
parent0746556beab1a57f1afb5c9d6f393d98528ce682 (diff)
downloadlinux-9b9d2e00bfa592aceda7b43da76c670df61faa97.tar.xz
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/rdma.c')
-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,
struct rds_rdma_args *args;
struct rds_iovec vec;
struct rm_rdma_op *op = &rm->rdma;
- unsigned int nr_pages;
+ int nr_pages;
unsigned int nr_bytes;
struct page **pages = NULL;
struct rds_iovec __user *local_vec;