Re: [PATCH v4] rust: add PidNamespace

From: Miguel Ojeda
Date: Wed Oct 02 2024 - 07:12:36 EST


On Wed, Oct 2, 2024 at 1:00 PM Christian Brauner <brauner@xxxxxxxxxx> wrote:
>
> + let pidns = unsafe { bindings::task_active_pid_ns(Task::current_raw()) };

Missing `// SAFETY` -- I mention it since this will be a warning (thus
error in `WERROR`) soon.

> + let ptr = unsafe { bindings::task_get_pid_ns(self.0.get()) };

Ditto.

> + Some(pidns) => unsafe { bindings::task_tgid_nr_ns(self.0.get(), pidns.as_ptr()) },
> + None => unsafe { bindings::task_tgid_nr_ns(self.0.get(), ptr::null_mut()) },

Ditto.

Cheers,
Miguel