bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH] machdev: Fix passthrough of control port and fsys_startup


From: Samuel Thibault
Subject: Re: [PATCH] machdev: Fix passthrough of control port and fsys_startup
Date: Sat, 13 Mar 2021 22:00:08 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Damien Zammit, le sam. 13 mars 2021 22:25:23 +1100, a ecrit:
> @@ -239,9 +239,14 @@ trivfs_S_fsys_startup (mach_port_t bootport,
>                         mach_port_t *realnode,
>                         mach_msg_type_name_t *realnodetype)
>  {
> +  mach_port_t mybootport;
> +
>    control_port = cntl;
>    *realnode = MACH_PORT_NULL;
> -  *realnodetype = MACH_MSG_TYPE_MOVE_SEND;
> +  *realnodetype = MACH_MSG_TYPE_COPY_SEND;
> +
> +  task_get_bootstrap_port (mach_task_self (), &mybootport);
> +  fsys_startup (mybootport, flags, control_port, MACH_MSG_TYPE_COPY_SEND, 
> realnode);

task_get_bootstrap_port might return a MACH_PORT_NULL bootstrap port.
trivfs_S_fsys_startup should thus be reworked into

- when the bootstrap port is null, return MACH_PORT_NULL as realnode
  like the original code did.
- when the bootstrap port is non-null, call fsys_startup on it with
  the realnode pointer like you did.

Samuel



reply via email to

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