lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1239734890.32604.102.camel@nimitz>
Date:	Tue, 14 Apr 2009 11:48:10 -0700
From:	Dave Hansen <dave@...ux.vnet.ibm.com>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	akpm@...ux-foundation.org, containers@...ts.linux-foundation.org,
	xemul@...allels.com, serue@...ibm.com, mingo@...e.hu,
	orenl@...columbia.edu, hch@...radead.org,
	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 26/30] cr: mount namespace

On Fri, 2009-04-10 at 06:40 +0400, Alexey Dobriyan wrote:
> 
> +struct mnt_namespace *alloc_mnt_ns(void)
> +{
> +       struct mnt_namespace *mnt_ns;
> +
> +       mnt_ns = kmalloc(sizeof(struct mnt_namespace), GFP_KERNEL);
> +       if (mnt_ns) {
> +               atomic_set(&mnt_ns->count, 1);
> +               mnt_ns->root = NULL;
> +               INIT_LIST_HEAD(&mnt_ns->list);
> +               init_waitqueue_head(&mnt_ns->poll);
> +               mnt_ns->event = 0;
> +       }
> +       return mnt_ns;
> +}
> +
>  /*
>   * Allocate a new namespace structure and populate it with contents
>   * copied from the namespace of the passed in task structure.
> @@ -1981,15 +1996,10 @@ static struct mnt_namespace *dup_mnt_ns(struct
> mnt_namespace *mnt_ns,
>         struct vfsmount *rootmnt = NULL, *pwdmnt = NULL;
>         struct vfsmount *p, *q;
> 
> -       new_ns = kmalloc(sizeof(struct mnt_namespace), GFP_KERNEL);
> +       new_ns = alloc_mnt_ns();
>         if (!new_ns)
>                 return ERR_PTR(-ENOMEM);
> 
> -       atomic_set(&new_ns->count, 1);
> -       INIT_LIST_HEAD(&new_ns->list);
> -       init_waitqueue_head(&new_ns->poll);
> -       new_ns->event = 0;
> -
>         down_write(&namespace_sem);
>         /* First pass: copy the tree topology */
>         new_ns->root = copy_tree(mnt_ns->root, mnt_ns->root->mnt_root,
> --- a/include/linux/cr.h

This bit should be broken out, and stuck at the beginning of the series.

-- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ