Messages in this thread | | | From | David Howells <> | Subject | Re: [RFC PATCH 5/8] KEYS: exec request-key within the requesting task's init namespace | Date | Thu, 05 Feb 2015 15:14:30 +0000 |
| |
Ian Kent <ikent@redhat.com> wrote:
> +#include <linux/fs.h>
Is that actually needed?
> + rki = kmalloc(sizeof(*rki), GFP_KERNEL); > + if (!rki) > + return -ENOMEM; > + > + if (use_ns) { > + tsk = umh_get_init_pid(); > + if (IS_ERR(tsk)) > + return PTR_ERR(tsk);
Memory leak of rki.
> + /* If running within a container use the container namespace */ > + if (current->nsproxy->net_ns != &init_net)
Is that a viable check? Is it possible to have a container that shares networking details?
David
| |