aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-08-16 03:25:00 +0000
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-01-06 18:07:57 -0500
commit31bf2335df157ea4f91023af12a2c148cebbf47e (patch)
tree38cd8edc2fb8226a0ba5d12b4d7b75a30c9bc3bd /net
parentdee9314a05ba1cca3831b749c73260edfcab3c54 (diff)
rds: fix a leak of kernel memory
commit f037590fff3005ce8a1513858d7d44f50053cc8f upstream. struct rds_rdma_notify contains a 32 bits hole on 64bit arches, make sure it is zeroed before copying it to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Andy Grover <andy.grover@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/rds/recv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/recv.c b/net/rds/recv.c
index e2a2b9344f7..93aadc0173c 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -297,7 +297,7 @@ static int rds_still_queued(struct rds_sock *rs, struct rds_incoming *inc,
int rds_notify_queue_get(struct rds_sock *rs, struct msghdr *msghdr)
{
struct rds_notifier *notifier;
- struct rds_rdma_notify cmsg;
+ struct rds_rdma_notify cmsg = { 0 }; /* fill holes with zero */
unsigned int count = 0, max_messages = ~0U;
unsigned long flags;
LIST_HEAD(copy);