[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 08/28: proc: Fix new task notifications.
From: |
Samuel Thibault |
Subject: |
[hurd] 08/28: proc: Fix new task notifications. |
Date: |
Wed, 16 Nov 2016 08:30:26 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 87c1eba3e7c9402ca59340db8a43a4c9ef5b3bd5
Author: Justus Winter <address@hidden>
Date: Thu Oct 13 23:39:33 2016 +0200
proc: Fix new task notifications.
* proc/mgt.c (S_mach_notify_new_task): Fix receiver handling, fix port
leak.
* proc/mig-mutate.h: Mutate the task notification protocol.
---
proc/mgt.c | 12 +++++++-----
proc/mig-mutate.h | 9 +++++++++
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/proc/mgt.c b/proc/mgt.c
index cb442b0..d572788 100644
--- a/proc/mgt.c
+++ b/proc/mgt.c
@@ -41,6 +41,7 @@
#include "mutated_ourmsg_U.h"
#include "proc_exc_S.h"
#include "proc_exc_U.h"
+#include "task_notify_S.h"
#include <hurd/signal.h>
/* Create a new id structure with the given genuine uids and gids. */
@@ -1048,13 +1049,13 @@ S_proc_get_code (struct proc *callerp,
/* Handle new task notifications from the kernel. */
error_t
-S_mach_notify_new_task (mach_port_t notify,
+S_mach_notify_new_task (struct port_info *notify,
mach_port_t task,
mach_port_t parent)
{
struct proc *parentp, *childp;
- if (notify != generic_port)
+ if (! notify || notify->class != generic_port_class)
return EOPNOTSUPP;
parentp = task_find_nocreate (parent);
@@ -1079,9 +1080,10 @@ S_mach_notify_new_task (mach_port_t notify,
proc_child, so we do it on their behalf. */
mach_port_mod_refs (mach_task_self (), task, MACH_PORT_RIGHT_SEND, +1);
err = S_proc_child (parentp, task);
- if (! err)
- /* Relay the notification. This consumes TASK and PARENT. */
- return mach_notify_new_task (childp->p_task_namespace, task, parent);
+ assert_perror (err);
+
+ /* Relay the notification. */
+ mach_notify_new_task (childp->p_task_namespace, task, parent);
}
mach_port_deallocate (mach_task_self (), task);
diff --git a/proc/mig-mutate.h b/proc/mig-mutate.h
index 62dc2a5..35b0241 100644
--- a/proc/mig-mutate.h
+++ b/proc/mig-mutate.h
@@ -35,3 +35,12 @@
end_using_port_info (port_info_t)
#define NOTIFY_IMPORTS \
import "libports/mig-decls.h";
+
+#define TASK_NOTIFY_INTRAN \
+ port_info_t begin_using_port_info_port (mach_port_t)
+#define TASK_NOTIFY_INTRAN_PAYLOAD \
+ port_info_t begin_using_port_info_payload
+#define TASK_NOTIFY_DESTRUCTOR \
+ end_using_port_info (port_info_t)
+#define TASK_NOTIFY_IMPORTS \
+ import "libports/mig-decls.h";
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 01/28: libdiskfs: Fix timestamp update on file close, (continued)
- [hurd] 01/28: libdiskfs: Fix timestamp update on file close, Samuel Thibault, 2016/11/16
- [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 <=
- [hurd] 19/28: Adjust to the fixed new task notifications., Samuel Thibault, 2016/11/16
- [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