diff options
| author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-01-22 23:48:46 +0100 |
|---|---|---|
| committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-01-22 23:48:46 +0100 |
| commit | f3d6454fdd38b5a745c15e053bbf2a08c7883f37 (patch) | |
| tree | 139cb004e4e05ce5dcbac08ba0fec81296abcbfd /debian | |
| parent | 0552edc695a235dba2dea3ba6962af29e17f36a7 (diff) | |
drop merged patch
Diffstat (limited to 'debian')
| -rw-r--r-- | debian/patches/pedantic-port-management.patch | 52 | ||||
| -rw-r--r-- | debian/patches/series | 2 |
2 files changed, 1 insertions, 53 deletions
diff --git a/debian/patches/pedantic-port-management.patch b/debian/patches/pedantic-port-management.patch deleted file mode 100644 index 3f1aa97..0000000 --- a/debian/patches/pedantic-port-management.patch +++ /dev/null @@ -1,52 +0,0 @@ -commit b700e68a2c42a94bdbcac9e3ece8d951fade3258 -Author: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Wed Jan 21 00:09:10 2015 +0100 - - ipc: warn about more port management bugs - - * ipc/mach_port.c (mach_port_destroy): Simplify expression. - (mach_port_deallocate): Likewise. - (mach_port_mod_refs): Also warn about errors when using this function. - -diff --git a/ipc/mach_port.c b/ipc/mach_port.c -index c7d9b81..e0ba4fe 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 (MACH_PORT_VALID (name) && 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 (MACH_PORT_VALID (name) && 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,18 @@ 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 (MACH_PORT_VALID (name) && space == current_space()) { -+ printf("task %.*s %screasing an invalid port " -+ "%lu by %d, most probably a bug.\n", -+ sizeof current_task()->name, -+ current_task()->name, -+ delta < 0 ? "de" : "in", name, delta); -+ 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 ad0d046..25a736d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,4 +7,4 @@ Add-some-padding-to-make-objects-fit-a-single-cache-.patch vm_cache_policy.patch 0001-XXX.patch -pedantic-port-management.patch + |
