Re: mmotm 2010-01-13-12-17 uploaded (cgroup)

From: Randy Dunlap
Date: Sun Jan 17 2010 - 21:04:09 EST


On Thu, 14 Jan 2010 12:20:06 -0500 Ben Blum wrote:

> On Thu, Jan 14, 2010 at 08:07:48AM -0800, Randy Dunlap wrote:
> > On Wed, 13 Jan 2010 12:17:36 -0800 akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> >
> > > The mm-of-the-moment snapshot 2010-01-13-12-17 has been uploaded to
> > >
> > > http://userweb.kernel.org/~akpm/mmotm/
> > >
> > > and will soon be available at
> > >
> > > git://zen-kernel.org/kernel/mmotm.git
> >
> >
> > patch: cgroups-subsystem-module-unloading.patch
> >
> > When CONFIG_MODULE_UNLOAD is not enabled:
> >
> > kernel/cgroup.c:1013: error: implicit declaration of function 'module_refcount'
> >
> >
> >
> > ---
> > ~Randy
> >
>
> Argh, my fault. try_module_get and module_put tricked me by not
> depending on that config option while module_refcount did. Fix here:
>
> From: Ben Blum <bblum@xxxxxxxxxxxxxx>
> Signed-off-by: Ben Blum <bblum@xxxxxxxxxxxxxx>
>
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index 391ff41..32e001e 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -964,7 +964,9 @@ static int rebind_subsystems(struct cgroupfs_root *root,
> * drop the extra reference.
> */
> module_put(ss->module);
> +#ifdef CONFIG_MODULE_UNLOAD
> BUG_ON(ss->module && !module_refcount(ss->module));
> +#endif
> } else {
> /* Subsystem state shouldn't exist */
> BUG_ON(cgrp->subsys[i]);

Thanks.

Acked-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>

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