summaryrefslogtreecommitdiff
path: root/debian/patches/procfs-maps.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/procfs-maps.patch')
-rw-r--r--debian/patches/procfs-maps.patch34
1 files changed, 25 insertions, 9 deletions
diff --git a/debian/patches/procfs-maps.patch b/debian/patches/procfs-maps.patch
index 3d1053fb..7e973e56 100644
--- a/debian/patches/procfs-maps.patch
+++ b/debian/patches/procfs-maps.patch
@@ -1,19 +1,28 @@
-From 5c1494757f27f3ec4feb6b9d85d91d8368ee9d25 Mon Sep 17 00:00:00 2001
+From f89a89b0ecefdc9327f799f9a0394e06cd1997c0 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Thu, 18 Sep 2014 18:38:04 +0200
-Subject: [PATCH] procfs: implement /proc/N/maps
+Subject: [PATCH 1/2] procfs: implement /proc/N/maps
+
+Fixes https://savannah.gnu.org/bugs/?32770 .
* procfs/process.c (process_file_gc_maps): New function.
(entries): Use the new function to implement /proc/N/maps.
---
- procfs/process.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 95 insertions(+)
+ procfs/process.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 103 insertions(+), 1 deletion(-)
diff --git a/procfs/process.c b/procfs/process.c
-index 4854148..feb68ff 100644
+index 4854148..a9b1a59 100644
--- a/procfs/process.c
+++ b/procfs/process.c
-@@ -109,6 +109,93 @@ process_file_gc_environ (struct proc_stat *ps, char **contents)
+@@ -1,5 +1,5 @@
+ /* Hurd /proc filesystem, implementation of process directories.
+- Copyright (C) 2010 Free Software Foundation, Inc.
++ Copyright (C) 2010,14 Free Software Foundation, Inc.
+
+ This file is part of the GNU Hurd.
+
+@@ -109,6 +109,100 @@ process_file_gc_environ (struct proc_stat *ps, char **contents)
}
static ssize_t
@@ -43,6 +52,11 @@ index 4854148..feb68ff 100644
+ struct mem_obj *objects = NULL;
+
+ s = open_memstream (contents, &contents_len);
++ if (s == NULL)
++ {
++ *contents = NULL;
++ return 0;
++ }
+
+ while (1)
+ {
@@ -91,8 +105,10 @@ index 4854148..feb68ff 100644
+
+ while (objects)
+ {
-+ mach_port_deallocate (mach_task_self (), objects->port);
-+ objects = objects->next;
++ struct mem_obj *o = objects;
++ mach_port_deallocate (mach_task_self (), o->port);
++ objects = o->next;
++ free (o);
+ }
+
+ /* This is a bit awkward, fortunately vm_region should not fail. */
@@ -107,7 +123,7 @@ index 4854148..feb68ff 100644
process_file_gc_stat (struct proc_stat *ps, char **contents)
{
struct procinfo *pi = proc_stat_proc_info (ps);
-@@ -348,6 +435,14 @@ static struct procfs_dir_entry entries[] = {
+@@ -348,6 +442,14 @@ static struct procfs_dir_entry entries[] = {
},
},
{