On Fri, Jan 9, 2009 at 8:50 PM, Li Zefan <lizf@xxxxxxxxxxxxxx> wrote: >> >> For checking the "children" list, you can just lock >> ipaddr_subsys.hierarchy_mutex. >> > > Unfortunately hierarchy_mutex can't be used here, since hierarchy_mutex > doesn't protect subsys's create() method, and the create() will access > parent cgroup's data. > But that can be solved by putting a spinlock in the ipaddr_cgroup structure and taking it in the write handler (and the connect/bind handlers, which should also be using RCU), and taking the parent structure's lock before copying from it in the create callback. No need for something as heavy as cgroup_lock(). Paul _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers