diff options
| author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-01-21 00:10:08 +0100 |
|---|---|---|
| committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-01-21 00:10:08 +0100 |
| commit | 0cf5370ed91fea8ca4fea572a6c2f326e10d86d4 (patch) | |
| tree | 537cc2ea5b410bb0391b6127999e45511dc16782 /debian/patches | |
| parent | 6828075a97200d3ec91f1eae893f774798834666 (diff) | |
add pedantic-port-management.patch
Diffstat (limited to 'debian/patches')
| -rw-r--r-- | debian/patches/pedantic-port-management.patch | 44 | ||||
| -rw-r--r-- | debian/patches/series | 44 |
2 files changed, 88 insertions, 0 deletions
diff --git a/debian/patches/pedantic-port-management.patch b/debian/patches/pedantic-port-management.patch new file mode 100644 index 0000000..f1371ef --- /dev/null +++ b/debian/patches/pedantic-port-management.patch @@ -0,0 +1,44 @@ +commit 7912cfc77c543de45b2b3e843859e72a48e313f4 +Author: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Wed Jan 21 00:09:10 2015 +0100 + + ipc: be more pedantic XXX + +diff --git a/ipc/mach_port.c b/ipc/mach_port.c +index c7d9b81..7f27533 100644 +--- a/ipc/mach_port.c ++++ b/ipc/mach_port.c +@@ -570,7 +570,7 @@ mach_port_destroy( + + kr = ipc_right_lookup_write(space, name, &entry); + if (kr != KERN_SUCCESS) { +- if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD && space == current_space()) { ++ if (space == current_space()) { + printf("task %.*s destroying an invalid port %lu, most probably a bug.\n", sizeof current_task()->name, current_task()->name, name); + if (mach_port_deallocate_debug) + SoftDebugger("mach_port_deallocate"); +@@ -614,7 +614,7 @@ mach_port_deallocate( + + kr = ipc_right_lookup_write(space, name, &entry); + if (kr != KERN_SUCCESS) { +- if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD && space == current_space()) { ++ if (space == current_space()) { + printf("task %.*s deallocating an invalid port %lu, most probably a bug.\n", sizeof current_task()->name, current_task()->name, name); + if (mach_port_deallocate_debug) + SoftDebugger("mach_port_deallocate"); +@@ -735,8 +735,14 @@ mach_port_mod_refs( + return KERN_INVALID_VALUE; + + kr = ipc_right_lookup_write(space, name, &entry); +- if (kr != KERN_SUCCESS) ++ if (kr != KERN_SUCCESS) { ++ if (space == current_space()) { ++ printf("task %.*s frobnicating an invalid port %lu, most probably a bug.\n", sizeof current_task()->name, current_task()->name, name); ++ if (mach_port_deallocate_debug) ++ SoftDebugger("mach_port_mod_refs"); ++ } + return kr; ++ } + /* space is write-locked and active */ + + kr = ipc_right_delta(space, name, entry, right, delta); /* unlocks */ diff --git a/debian/patches/series b/debian/patches/series index bfc5f00..991b2d1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,3 +7,47 @@ Add-some-padding-to-make-objects-fit-a-single-cache-.patch vm_cache_policy.patch 0001-XXX.patch +commit 7912cfc77c543de45b2b3e843859e72a48e313f4 +Author: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Wed Jan 21 00:09:10 2015 +0100 + + ipc: be more pedantic XXX + +diff --git a/ipc/mach_port.c b/ipc/mach_port.c +index c7d9b81..7f27533 100644 +--- a/ipc/mach_port.c ++++ b/ipc/mach_port.c +@@ -570,7 +570,7 @@ mach_port_destroy( + + kr = ipc_right_lookup_write(space, name, &entry); + if (kr != KERN_SUCCESS) { +- if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD && space == current_space()) { ++ if (space == current_space()) { + printf("task %.*s destroying an invalid port %lu, most probably a bug.\n", sizeof current_task()->name, current_task()->name, name); + if (mach_port_deallocate_debug) + SoftDebugger("mach_port_deallocate"); +@@ -614,7 +614,7 @@ mach_port_deallocate( + + kr = ipc_right_lookup_write(space, name, &entry); + if (kr != KERN_SUCCESS) { +- if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD && space == current_space()) { ++ if (space == current_space()) { + printf("task %.*s deallocating an invalid port %lu, most probably a bug.\n", sizeof current_task()->name, current_task()->name, name); + if (mach_port_deallocate_debug) + SoftDebugger("mach_port_deallocate"); +@@ -735,8 +735,14 @@ mach_port_mod_refs( + return KERN_INVALID_VALUE; + + kr = ipc_right_lookup_write(space, name, &entry); +- if (kr != KERN_SUCCESS) ++ if (kr != KERN_SUCCESS) { ++ if (space == current_space()) { ++ printf("task %.*s frobnicating an invalid port %lu, most probably a bug.\n", sizeof current_task()->name, current_task()->name, name); ++ if (mach_port_deallocate_debug) ++ SoftDebugger("mach_port_mod_refs"); ++ } + return kr; ++ } + /* space is write-locked and active */ + + kr = ipc_right_delta(space, name, entry, right, delta); /* unlocks */ |
