From 9b9d2e00bfa592aceda7b43da76c670df61faa97 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 18 Sep 2010 13:42:25 +0000 Subject: 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 Signed-off-by: David S. Miller --- net/rds/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/rds') diff --git a/net/rds/rdma.c b/net/rds/rdma.c index 48064673fc7..1a41debca1c 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; -- cgit v1.2.3-70-g09d2