Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Woah man, fix enormous leak.
details: https://anonhg.NetBSD.org/src/rev/04a4675d0fe9
branches: trunk
changeset: 445872:04a4675d0fe9
user: maxv <maxv%NetBSD.org@localhost>
date: Thu Nov 15 14:19:23 2018 +0000
description:
Woah man, fix enormous leak.
Possible info leak: [len=1056, leaked=931]
#0 0xffffffff80bad351 in kleak_copyout
#1 0xffffffff80b2cf64 in uvm_swap_stats.part.1
#2 0xffffffff80b2d38d in uvm_swap_stats
#3 0xffffffff80b2d43c in sys_swapctl
#4 0xffffffff80259b82 in syscall
diffstat:
sys/uvm/uvm_swap.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 1d63cca03530 -r 04a4675d0fe9 sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c Thu Nov 15 13:50:51 2018 +0000
+++ b/sys/uvm/uvm_swap.c Thu Nov 15 14:19:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_swap.c,v 1.177 2018/03/15 03:21:58 christos Exp $ */
+/* $NetBSD: uvm_swap.c,v 1.178 2018/11/15 14:19:23 maxv Exp $ */
/*
* Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.177 2018/03/15 03:21:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.178 2018/11/15 14:19:23 maxv Exp $");
#include "opt_uvmhist.h"
#include "opt_compat_netbsd.h"
@@ -744,6 +744,7 @@
inuse = btodb((uint64_t)sdp->swd_npginuse <<
PAGE_SHIFT);
+ memset(&sep, 0, sizeof(sep));
swapent_cvt(&sep, sdp, inuse);
if (f)
(*f)(&sep, &sep);
Home |
Main Index |
Thread Index |
Old Index