commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 05/06: boot: fix crash when S_processor_set_tasks is called early


From: Samuel Thibault
Subject: [hurd] 05/06: boot: fix crash when S_processor_set_tasks is called early
Date: Sun, 20 Nov 2016 21:18:22 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 7d740ab409689eefe9c88e7d1e7d94b8189ddf19
Author: Samuel Thibault <address@hidden>
Date:   Sun Nov 20 20:41:20 2016 +0100

    boot: fix crash when S_processor_set_tasks is called early
    
    * boot/boot.c (S_processor_set_tasks): Return empty array when
    task_ihash.nr_items is still 0.
---
 boot/boot.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/boot/boot.c b/boot/boot.c
index d0e0207..491c1a9 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -1994,6 +1994,10 @@ S_processor_set_tasks(mach_port_t processor_set,
   error_t err;
   size_t i;
 
+  if (!task_ihash.nr_items)
+    *task_listCnt = 0;
+  return 0;
+
   err = vm_allocate (mach_task_self (), (vm_address_t *) task_list,
                     task_ihash.nr_items * sizeof **task_list, 1);
   if (err)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]