diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-08-15 23:25:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-19 02:40:03 -0400 |
commit | f037590fff3005ce8a1513858d7d44f50053cc8f (patch) | |
tree | 5ea1d9356272524e9ebc6c30e2ab4ad06ed6b0e6 | |
parent | 68d6ac6d2740b6a55f3ae92a4e0be6d881904b32 (diff) |
rds: fix a leak of kernel memory
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>
-rw-r--r-- | net/rds/recv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/recv.c b/net/rds/recv.c index 795a00b7f2cb..c93588c2d553 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, | |||
297 | int rds_notify_queue_get(struct rds_sock *rs, struct msghdr *msghdr) | 297 | int rds_notify_queue_get(struct rds_sock *rs, struct msghdr *msghdr) |
298 | { | 298 | { |
299 | struct rds_notifier *notifier; | 299 | struct rds_notifier *notifier; |
300 | struct rds_rdma_notify cmsg; | 300 | struct rds_rdma_notify cmsg = { 0 }; /* fill holes with zero */ |
301 | unsigned int count = 0, max_messages = ~0U; | 301 | unsigned int count = 0, max_messages = ~0U; |
302 | unsigned long flags; | 302 | unsigned long flags; |
303 | LIST_HEAD(copy); | 303 | LIST_HEAD(copy); |