Hello,

Mikhail Karpov, le lun. 26 oct. 2026 00:27:41 +0700, a ecrit:
> diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
> index 1c09973..0950334 100644
> --- a/libfshelp/fetch-root.c
> +++ b/libfshelp/fetch-root.c
> @@ -180,15 +180,16 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
>      }
>  
>    control = box->active;
> -  mach_port_mod_refs (mach_task_self (), control,
> -                   MACH_PORT_RIGHT_SEND, 1);
> +  err = mach_port_mod_refs (mach_task_self (), control,
> +                         MACH_PORT_RIGHT_SEND, 1);
>    pthread_mutex_unlock (box->lock);
>  
>    /* Cancellation point XXX */
> -  err = fsys_getroot (control, dotdot, MACH_MSG_TYPE_COPY_SEND,
> -                   user->uids->ids, user->uids->num,
> -                   user->gids->ids, user->gids->num,
> -                   flags, retry, retryname, root);
> +  if (!err)
> +    err = fsys_getroot (control, dotdot, MACH_MSG_TYPE_COPY_SEND,
> +                     user->uids->ids, user->uids->num,
> +                     user->gids->ids, user->gids->num,
> +                     flags, retry, retryname, root);
>  
>    pthread_mutex_lock (box->lock);
>  

I had to revert this part, it was making detection of dead translators
bogus:

     # ls /dev/full
     # kill -9 pid_of_full
     # ls /dev/full

    leads to this kind of messages:

    task ext2fs increasing a bogus port 1993 by 1, most probably a bug.
    task ext2fs deallocating a bogus port 1993, most probably a bug.

    and mayhem starts.

When the translator is killed, control becomes a dead port name, and
mach_port_mod_refs fails, and the handling below probably gets wrong.

Samuel

Reply via email to