netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch -next] rds: signedness bug
@ 2010-09-18 23:42 Dan Carpenter
  2010-09-19 18:59 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-09-18 23:42 UTC (permalink / raw)
  To: Andy Grover; +Cc: David S. Miller, rds-devel, netdev, kernel-janitors

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>

diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 4806467..1a41deb 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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch -next] rds: signedness bug
  2010-09-18 23:42 [patch -next] rds: signedness bug Dan Carpenter
@ 2010-09-19 18:59 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-09-19 18:59 UTC (permalink / raw)
  To: error27; +Cc: andy.grover, rds-devel, netdev, kernel-janitors

From: Dan Carpenter <error27@gmail.com>
Date: Sun, 19 Sep 2010 01:42:25 +0200

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-19 18:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-18 23:42 [patch -next] rds: signedness bug Dan Carpenter
2010-09-19 18:59 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).