Skip to content

Commit f037590

Browse files
Eric Dumazetdavem330
authored andcommitted
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>
1 parent 68d6ac6 commit f037590

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/rds/recv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ static int rds_still_queued(struct rds_sock *rs, struct rds_incoming *inc,
297297
int rds_notify_queue_get(struct rds_sock *rs, struct msghdr *msghdr)
298298
{
299299
struct rds_notifier *notifier;
300-
struct rds_rdma_notify cmsg;
300+
struct rds_rdma_notify cmsg = { 0 }; /* fill holes with zero */
301301
unsigned int count = 0, max_messages = ~0U;
302302
unsigned long flags;
303303
LIST_HEAD(copy);

0 commit comments

Comments
 (0)