* [PATCH] rds: fix a leak of kernel memory
@ 2010-08-16 13:25 Eric Dumazet
2010-08-19 6:40 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2010-08-16 13:25 UTC (permalink / raw)
To: David Miller; +Cc: Andy Grover, netdev
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>
---
net/rds/recv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rds/recv.c b/net/rds/recv.c
index 795a00b..c93588c 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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rds: fix a leak of kernel memory
2010-08-16 13:25 [PATCH] rds: fix a leak of kernel memory Eric Dumazet
@ 2010-08-19 6:40 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-08-19 6:40 UTC (permalink / raw)
To: eric.dumazet; +Cc: andy.grover, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 16 Aug 2010 15:25:00 +0200
> 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>
Applied, thanks a lot Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-19 6:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-16 13:25 [PATCH] rds: fix a leak of kernel memory Eric Dumazet
2010-08-19 6:40 ` 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).