From: Dan Carpenter Date: Sat, 18 Sep 2010 13:42:25 +0000 (+0000) Subject: rds: signedness bug X-Git-Tag: MMI-PSA29.97-13-9~21994^2~401 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b9d2e00bfa592aceda7b43da76c670df61faa97;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 --- 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;