lkml.org 
[lkml]   [2015]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH 5/8] KEYS: exec request-key within the requesting task's init namespace
Date
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


\
 
 \ /
  Last update: 2015-02-05 16:21    [W:0.259 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site