[Devel] Re: cgroup debug seems dead?

Stephen Hemminger shemminger at vyatta.com
Tue Oct 19 18:12:45 PDT 2010


On Wed, 20 Oct 2010 09:11:10 +0800
Li Zefan <lizf at cn.fujitsu.com> wrote:

> Stephen Hemminger wrote:
> > While running namespace checks to look for dead code,
> > I found that debug_subsys is declared global but never
> > used in current code.
> > 
> > This leads to the fact that since debug_subsys is never
> > used, the whole set of debugging functions is also never
> > used.  Is the whole CGROUP_DEBUG config option dead?
> > 
> 
> No, it's not.
> 
> The debug code has been moved from kernel/cgroup_debug.c to
> kernel/cgroup.c, but the config and the code is not dead.
> 
> Is it a false positive of that check? The pointer to debug_subsys
> is stored in an array, and the array will be iterated in some places,
> so debug_subsys will be accessed.

Where is it stored in an array?

~/kernel/linux-2.6$ git grep debug_subsys
kernel/cgroup.c:        kfree(cont->subsys[debug_subsys_id]);
kernel/cgroup.c:struct cgroup_subsys debug_subsys = {
kernel/cgroup.c:        .subsys_id = debug_subsys_id,

There does not appear to be any place that structure is
referenced.
-- 
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list