cgroups: __rcu annotations
authorArnd Bergmann <arnd@arndb.de>
Wed, 24 Feb 2010 18:41:39 +0000 (19:41 +0100)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 20 Aug 2010 00:18:00 +0000 (17:18 -0700)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
include/linux/cgroup.h
include/linux/sched.h
kernel/cgroup.c

index ed3e92e41c6e5683ad3dbb823e48259f5150ac33..3cb7d04308cdc4fd2670bd89af83b49d28dbdb20 100644 (file)
@@ -75,7 +75,7 @@ struct cgroup_subsys_state {
 
        unsigned long flags;
        /* ID for this css, if possible */
-       struct css_id *id;
+       struct css_id __rcu *id;
 };
 
 /* bits in struct cgroup_subsys_state flags field */
@@ -205,7 +205,7 @@ struct cgroup {
        struct list_head children;      /* my children */
 
        struct cgroup *parent;          /* my parent */
-       struct dentry *dentry;          /* cgroup fs entry, RCU protected */
+       struct dentry __rcu *dentry;    /* cgroup fs entry, RCU protected */
 
        /* Private pointers for each registered subsystem */
        struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
index 1e2a6db2d7dd03466bf850dc5011860c23e8f9c9..bbffd087476c43c31f2c854a416ea278082b3242 100644 (file)
@@ -1418,7 +1418,7 @@ struct task_struct {
 #endif
 #ifdef CONFIG_CGROUPS
        /* Control Group info protected by css_set_lock */
-       struct css_set *cgroups;
+       struct css_set __rcu *cgroups;
        /* cg_list protected by css_set_lock and tsk->alloc_lock */
        struct list_head cg_list;
 #endif
index 192f88c5b0f9df29b80d51d4c5ceba5388d099eb..e5c5497a7dca3a6efe0687813668f754b909fc23 100644 (file)
@@ -138,7 +138,7 @@ struct css_id {
         * is called after synchronize_rcu(). But for safe use, css_is_removed()
         * css_tryget() should be used for avoiding race.
         */
-       struct cgroup_subsys_state *css;
+       struct cgroup_subsys_state __rcu *css;
        /*
         * ID of this css.
         */