rds: signedness bug
PATCH 1/1 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 <[email protected]>
net/rds/rdma.c +1 -1
@@ -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;
From: Dan Carpenter <[email protected]>
Date: Sun, 19 Sep 2010 01:42:25 +0200
Quoted 4 lines
In the original code if the
copy_from_user()fails inrds_rdma_pages()then the error handling fails and we get a stack trace fromkmalloc().Signed-off-by Dan Carpenter <[email protected]>
Applied.