[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 19/28: Adjust to the fixed new task notifications.
From: |
Samuel Thibault |
Subject: |
[hurd] 19/28: Adjust to the fixed new task notifications. |
Date: |
Wed, 16 Nov 2016 08:30:27 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 0bc74163d5406e305b84f8f51dbce097bb46fa90
Author: Justus Winter <address@hidden>
Date: Tue Nov 1 18:02:34 2016 +0100
Adjust to the fixed new task notifications.
* boot/boot.c (S_mach_notify_new_task): The send rights are now indeed
moved to the target task, adjust accordingly.
* proc/mgt.c (S_mach_notify_new_task): Likewise.
---
boot/boot.c | 6 ++++--
proc/mgt.c | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/boot/boot.c b/boot/boot.c
index db5c396..f7c7d77 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -1942,6 +1942,7 @@ S_mach_notify_new_task (mach_port_t notify,
goto fail;
assert (! MACH_PORT_VALID (previous));
+ mach_port_mod_refs (mach_task_self (), task, MACH_PORT_RIGHT_SEND, +1);
err = hurd_ihash_add (&task_ihash,
(hurd_ihash_key_t) task, (hurd_ihash_value_t) task);
if (err)
@@ -1951,9 +1952,10 @@ S_mach_notify_new_task (mach_port_t notify,
}
if (MACH_PORT_VALID (new_task_notification))
- /* Relay the notification. */
- mach_notify_new_task (new_task_notification, task, parent);
+ /* Relay the notification. This consumes task and parent. */
+ return mach_notify_new_task (new_task_notification, task, parent);
+ mach_port_deallocate (mach_task_self (), task);
mach_port_deallocate (mach_task_self (), parent);
return 0;
diff --git a/proc/mgt.c b/proc/mgt.c
index d572788..8dc82f1 100644
--- a/proc/mgt.c
+++ b/proc/mgt.c
@@ -1082,8 +1082,8 @@ S_mach_notify_new_task (struct port_info *notify,
err = S_proc_child (parentp, task);
assert_perror (err);
- /* Relay the notification. */
- mach_notify_new_task (childp->p_task_namespace, task, parent);
+ /* Relay the notification. This consumes task and parent. */
+ return mach_notify_new_task (childp->p_task_namespace, task, parent);
}
mach_port_deallocate (mach_task_self (), task);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 04/28: wire console display pages, (continued)
- [hurd] 04/28: wire console display pages, Samuel Thibault, 2016/11/16
- [hurd] 02/28: libdiskfs: Make utimes RPC flush pending timestamp updates, Samuel Thibault, 2016/11/16
- [hurd] 11/28: startup: Dump processes if we cannot find the kernel., Samuel Thibault, 2016/11/16
- [hurd] 03/28: Fix typo, Samuel Thibault, 2016/11/16
- [hurd] 12/28: boot: Use the smallest possible name when inserting rights., Samuel Thibault, 2016/11/16
- [hurd] 15/28: boot: restore terminal state on exit, Samuel Thibault, 2016/11/16
- [hurd] 18/28: boot: Tidy up the argument parser., Samuel Thibault, 2016/11/16
- [hurd] 24/28: eth-multiplexer: Avoid local definitions., Samuel Thibault, 2016/11/16
- [hurd] 28/28: libpager: fix returning error on data_unlock, Samuel Thibault, 2016/11/16
- [hurd] 08/28: proc: Fix new task notifications., Samuel Thibault, 2016/11/16
- [hurd] 19/28: Adjust to the fixed new task notifications.,
Samuel Thibault <=
- [hurd] 22/28: eth-multiplexer: Fix packet delivery., Samuel Thibault, 2016/11/16
- [hurd] 16/28: boot: Allow unprivileged users to boot Subhurds., Samuel Thibault, 2016/11/16
- [hurd] 17/28: boot: Add a default boot script., Samuel Thibault, 2016/11/16
- [hurd] 10/28: Add missing spinlock initializers, Samuel Thibault, 2016/11/16
- [hurd] 23/28: eth-multiplexer: Fix retrieving status of virtual interfaces., Samuel Thibault, 2016/11/16
- [hurd] 26/28: boot: Improve device pass-through., Samuel Thibault, 2016/11/16
- [hurd] 25/28: eth-multiplexer: Generate stable ethernet addresses., Samuel Thibault, 2016/11/16
- [hurd] 05/28: Mark library stubs as weak, Samuel Thibault, 2016/11/16
- [hurd] 13/28: boot: Quote arguments containing spaces., Samuel Thibault, 2016/11/16
- [hurd] 09/28: boot: Remove hacks for running boot on UX., Samuel Thibault, 2016/11/16