summaryrefslogtreecommitdiff
path: root/debian/patches/fixes0001-kern-fix-error-handling.patch
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-06-18 13:46:00 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-06-18 13:46:00 +0200
commitffc9f1de70a3a208fac47c115e92cdcbfb3bd85a (patch)
tree098dc7946bdae0ff624080c3872cb4c04fc19b9e /debian/patches/fixes0001-kern-fix-error-handling.patch
parent9e25abf8f7cba9603f8c97a20c3d638e89032c6f (diff)
add patch series
Diffstat (limited to 'debian/patches/fixes0001-kern-fix-error-handling.patch')
-rw-r--r--debian/patches/fixes0001-kern-fix-error-handling.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/fixes0001-kern-fix-error-handling.patch b/debian/patches/fixes0001-kern-fix-error-handling.patch
new file mode 100644
index 0000000..8add2dd
--- /dev/null
+++ b/debian/patches/fixes0001-kern-fix-error-handling.patch
@@ -0,0 +1,32 @@
+From 0f67c426360374dc94beae39d5095542dc751093 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Thu, 18 Jun 2015 13:45:01 +0200
+Subject: [PATCH gnumach] kern: fix error handling
+
+* kern/thread.c (kernel_thread): Fix error handling.
+---
+ kern/thread.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/kern/thread.c b/kern/thread.c
+index 8b1e9f5..1f47553 100644
+--- a/kern/thread.c
++++ b/kern/thread.c
+@@ -1667,9 +1667,13 @@ thread_t kernel_thread(
+ continuation_t start,
+ void * arg)
+ {
++ kern_return_t kr;
+ thread_t thread;
+
+- (void) thread_create(task, &thread);
++ kr = thread_create(task, &thread);
++ if (kr != KERN_SUCCESS)
++ return THREAD_NULL;
++
+ /* release "extra" ref that thread_create gave us */
+ thread_deallocate(thread);
+ thread_start(thread, start);
+--
+2.1.4
+