Re: [PATCH 02/12] cgroups: New resource counter inheritance API

From: Andrew Morton
Date: Tue Sep 06 2011 - 18:18:26 EST


On Tue, 6 Sep 2011 02:12:56 +0200
Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:

> +void res_counter_inherit(struct res_counter *counter, int member)
> +{
> + struct res_counter *parent;
> + unsigned long long val;
> +
> + parent = counter->parent;
> + if (parent) {
> + val = res_counter_read_u64(parent, member);
> + res_counter_write_u64(counter, member, val);
> + }
> +}

What locking protects the read-modify-write? If none, please fix,
otherwise please document it.

All of kernel/res_counter.c is charmingly undocumented.
--
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/