[PATCH cgroup 1/2] cgroup: move module ref handling into rebind_subsystems()

Tejun Heo tj at kernel.org
Fri Jul 12 20:10:02 UTC 2013


On Fri, Jul 12, 2013 at 05:08:23PM +0800, Li Zefan wrote:
> > so a modular cgroup subsystem can be unloaded inbetween, say it's net_cls, and
> > then it's possible that:
> > 
> > 	# mount -t cgroup -o net_cls xxx /cgroup
> > 
> > The above operation succeeds but it's not binded to cgroupfs as it just got
> > unloaded.

Ooh, right, it'd be excluded from the iteration.

> for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
> 	...
> 	if (!subsys[i] && (added_mask & (1 << i))
> 		return -EINVAL;
> 	...
> }
> 
> This should work.

Yeah, I kinda dislike the raw iteration tho.  I wonder whether setting
the actually added mask and comparing would be cleaner.  I'll
experiment with it and post the updated patch.

Thanks!

-- 
tejun


More information about the Containers mailing list