[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
- [hurd] branch upstream updated (385d9bf -> 7bd08cf), Samuel Thibault, 2016/11/20
- [hurd] 03/06: ext2fs: Do not talk about crashing on ENOSPC, Samuel Thibault, 2016/11/20
- [hurd] 06/06: Fix build, Samuel Thibault, 2016/11/20
- [hurd] 04/06: ext2fs: Use more POSIXish error code, Samuel Thibault, 2016/11/20
- [hurd] 05/06: boot: fix crash when S_processor_set_tasks is called early,
Samuel Thibault <=
- [hurd] 02/06: libpager, libstore: Fix crash on ENOSPC while writing data, Samuel Thibault, 2016/11/20
- [hurd] 01/06: ext2fs: Fix crash on ENOSPC while extending a directory, Samuel Thibault, 2016/11/20