Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/miscfs/procfs Avoid leaking pages. Fixes PR 42053 from S...



details:   https://anonhg.NetBSD.org/src/rev/e26e1fda6696
branches:  trunk
changeset: 748279:e26e1fda6696
user:      dholland <dholland%NetBSD.org@localhost>
date:      Mon Oct 19 01:25:29 2009 +0000

description:
Avoid leaking pages. Fixes PR 42053 from SHIMIZU Ryo.

diffstat:

 sys/miscfs/procfs/procfs_linux.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r aa2477a12f41 -r e26e1fda6696 sys/miscfs/procfs/procfs_linux.c
--- a/sys/miscfs/procfs/procfs_linux.c  Mon Oct 19 01:24:19 2009 +0000
+++ b/sys/miscfs/procfs/procfs_linux.c  Mon Oct 19 01:25:29 2009 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: procfs_linux.c,v 1.57 2009/01/11 03:16:33 christos Exp $      */
+/*      $NetBSD: procfs_linux.c,v 1.58 2009/10/19 01:25:29 dholland Exp $      */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.57 2009/01/11 03:16:33 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.58 2009/10/19 01:25:29 dholland Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -379,6 +379,8 @@
                (unsigned long)(vm->vm_ssize),  /* stack size in pages */
                (unsigned long) 0);
 
+       uvmspace_free(vm);
+
        if (len == 0)
                goto out;
 
@@ -483,6 +485,8 @@
        mutex_exit(p->p_lock);
        mutex_exit(proc_lock);
 
+       uvmspace_free(vm);
+
        if (len == 0)
                goto out;
 



Home | Main Index | Thread Index | Old Index