Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/miscfs/procfs Pull up following revision(s) (requeste...
details: https://anonhg.NetBSD.org/src/rev/c2a11c29be1f
branches: netbsd-9
changeset: 1000828:c2a11c29be1f
user: martin <martin%NetBSD.org@localhost>
date: Tue Sep 10 16:11:00 2019 +0000
description:
Pull up following revision(s) (requested by chs in ticket #190):
sys/miscfs/procfs/procfs_linux.c: revision 1.76
have procfs_do_pid_stat() pass the proc's map to get_proc_size_info(),
rather than having the latter look up the map again and not check
for an error.
diffstat:
sys/miscfs/procfs/procfs_linux.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diffs (57 lines):
diff -r 143810025d9b -r c2a11c29be1f sys/miscfs/procfs/procfs_linux.c
--- a/sys/miscfs/procfs/procfs_linux.c Sat Sep 07 18:06:30 2019 +0000
+++ b/sys/miscfs/procfs/procfs_linux.c Tue Sep 10 16:11:00 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_linux.c,v 1.74 2018/12/05 18:16:51 christos Exp $ */
+/* $NetBSD: procfs_linux.c,v 1.74.4.1 2019/09/10 16:11:00 martin Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.74 2018/12/05 18:16:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.74.4.1 2019/09/10 16:11:00 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -75,19 +75,15 @@
#define LBFSZ (8 * 1024)
static void
-get_proc_size_info(struct lwp *l, unsigned long *stext, unsigned long *etext, unsigned long *sstack)
+get_proc_size_info(struct proc *p, struct vm_map *map, unsigned long *stext,
+ unsigned long *etext, unsigned long *sstack)
{
- struct proc *p = l->l_proc;
- struct vmspace *vm;
- struct vm_map *map;
struct vm_map_entry *entry;
*stext = 0;
*etext = 0;
*sstack = 0;
- proc_vmspace_getref(p, &vm);
- map = &vm->vm_map;
vm_map_lock_read(map);
for (entry = map->header.next; entry != &map->header;
@@ -128,7 +124,6 @@
*sstack -= PAGE_SIZE;
vm_map_unlock_read(map);
- uvmspace_free(vm);
}
/*
@@ -435,7 +430,7 @@
goto out;
}
- get_proc_size_info(l, &stext, &etext, &sstack);
+ get_proc_size_info(p, &vm->vm_map, &stext, &etext, &sstack);
mutex_enter(proc_lock);
mutex_enter(p->p_lock);
Home |
Main Index |
Thread Index |
Old Index