summaryrefslogtreecommitdiff
path: root/debian/patches/0027-xxx-hopefully-fix-proc-crash.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0027-xxx-hopefully-fix-proc-crash.patch')
-rw-r--r--debian/patches/0027-xxx-hopefully-fix-proc-crash.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/debian/patches/0027-xxx-hopefully-fix-proc-crash.patch b/debian/patches/0027-xxx-hopefully-fix-proc-crash.patch
new file mode 100644
index 00000000..97940bbb
--- /dev/null
+++ b/debian/patches/0027-xxx-hopefully-fix-proc-crash.patch
@@ -0,0 +1,70 @@
+From f9073693da68e5b94f62d67b81b556a443fd4993 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Fri, 21 Nov 2014 04:48:41 +0100
+Subject: [PATCH hurd 27/29] xxx hopefully fix proc crash
+
+---
+ libports/destroy-right.c | 26 ++++++--------------------
+ 1 file changed, 6 insertions(+), 20 deletions(-)
+
+diff --git a/libports/destroy-right.c b/libports/destroy-right.c
+index ed6b66b..ad9ba94 100644
+--- a/libports/destroy-right.c
++++ b/libports/destroy-right.c
+@@ -27,7 +27,7 @@
+ #include <time.h>
+
+ /* To prevent protected payloads from becoming stale, we defer the
+- derefercing of port_info objects. */
++ derefercing of port_info objects. Consumes PI. */
+ static error_t defer_dereferencing (struct port_info *pi);
+
+ error_t
+@@ -114,19 +114,6 @@ gc_loop (void *arg)
+ while (d != NULL)
+ {
+ struct deferred_dereference *next = d->next;
+- struct references refs;
+-
+- refcounts_references (&d->pi->refcounts, &refs);
+-
+- // XXX: Need to think more about this.
+- assert (refs.hard <= 2 || !"reference to destroyed right leaked");
+-
+- if (refs.hard == 2)
+- {
+- /* XXX: does this actually happen? if so, why?? */
+- /* Get rid of the hash table reference. */
+- ports_port_deref (d->pi);
+- }
+
+ /* Get rid of our reference. */
+ ports_port_deref (d->pi);
+@@ -159,19 +146,18 @@ start_gc (void)
+ assert_perror (err);
+ }
+
+-/* Defer the derefercing of port_info objects. */
++/* Defer the derefercing of port_info objects. Consumes PI. */
+ static error_t
+ defer_dereferencing (struct port_info *pi)
+ {
+ static pthread_once_t once = PTHREAD_ONCE_INIT;
+ int g;
+- struct deferred_dereference *d = malloc (sizeof *d);
+- if (d == NULL)
+- return ENOMEM;
+-
++ struct deferred_dereference *d;
+ pthread_once (&once, start_gc);
+
+- ports_port_ref (pi);
++ d = malloc (sizeof *d);
++ if (d == NULL)
++ return ENOMEM;
+ d->pi = pi;
+
+ retry:
+--
+2.1.3
+