lkml.org 
[lkml]   [2014]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [GIT PULL] cgroup changes for v3.15-rc1
    From
    On Thu, Apr 3, 2014 at 11:11 AM, Linus Torvalds
    <torvalds@linux-foundation.org> wrote:
    >
    > And the "bool *new_sb_created" argument really makes *zero* sense to
    > kernfs_mount(). It was added to fix a namespace refcount leak, BUT
    > kernfs_mount() DOES NOT TAKE A NAMESPACE PARAMETER!

    Let me clarify that: the only reason I can see for why you'd care
    about whether a new sb has been created is because the new sb needs a
    namespace refcount.

    Now, *if* there is some other reason to care, then the
    "new_sb_created" argument may make sense even for kernfs_mount(). I
    just don't see it. But if I'm wrong about that, then my alternate
    resolution is wrong. However, as far as I can tell, anything else
    should be properly refcounted by the mounting logic, and the "ns"
    parameter is the only thing that needs to be handled by the caller
    because it has that stupid opaque pointer that doesn't know its own
    type.

    Could that perhaps be fixed? If kernfs_mount_ns() could just do the
    proper "grab" on the "void *ns" directly, all of the stupid
    "new_sb_created" crud could just go away, even for kernfs_mount_ns().

    Linus


    \
     
     \ /
      Last update: 2014-04-04 04:21    [W:4.933 / U:0.440 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site