diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-11-21 14:59:42 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-11-21 14:59:42 +0100 |
commit | b0cf42547cf95c236c82b871e94c1e9e66a8de7a (patch) | |
tree | 519948f3c58de8a63a6452fbc7c8b34e55fba127 /debian/patches/0028-xxx-hopefully-fix-proc-crash.patch | |
parent | e79ac4182e0532bce1b65c964e5dccce42f77f7a (diff) |
add patch series
Diffstat (limited to 'debian/patches/0028-xxx-hopefully-fix-proc-crash.patch')
-rw-r--r-- | debian/patches/0028-xxx-hopefully-fix-proc-crash.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/debian/patches/0028-xxx-hopefully-fix-proc-crash.patch b/debian/patches/0028-xxx-hopefully-fix-proc-crash.patch new file mode 100644 index 00000000..2f3a39b4 --- /dev/null +++ b/debian/patches/0028-xxx-hopefully-fix-proc-crash.patch @@ -0,0 +1,70 @@ +From f580a5ba5bcf9592335aac4d3aa8ce86cd6a9906 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 28/30] 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 9eb29eb..3a78e0b 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 +@@ -116,19 +116,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); +@@ -161,19 +148,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 + |