Re: Re: [PATCH V3] binder: ipc namespace support for android binder(Internet mail)
From: chouryzhou(åå)
Date: Sat Nov 10 2018 - 00:43:35 EST
> >
> > If IPC_NS is disabled, "current-nsporxy->ipc_ns" will also exists, it will be a static
> > reference of "init_ipc_ns" (in ipc/msgutil.c, not defined in binder.c by me) with
> > no namespace-ization. You will get the same one in all processes, everything is
> > the same as without this patch.
>Â
> except, as far as I can tell, binder_init_ns() would never have been
> called on it so the mutex and list heads are not initialized so its
> completely broken. Am I missing something? How do those fields get
> initialized in this case?
> @@ -5832,8 +5888,12 @@ static int __init binder_init(void)
> Â Â Â Â Â Â Â Â Â Â Â Â goto err_init_binder_device_failed;
> Â Â Â Â }
>
> - Â Â Â return ret;
> + Â Â Â ret = binder_init_ns(&init_ipc_ns);
> + Â Â Â if (ret)
> + Â Â Â Â Â Â Â goto err_init_namespace_failed;
>
> + Â Â Â return ret;
They are initialized here.
- choury -