Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze
[pandora-kernel.git] / kernel / cgroup_freezer.c
index eb3f34d..e5c0244 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/slab.h>
 #include <linux/cgroup.h>
 #include <linux/fs.h>
 #include <linux/uaccess.h>
@@ -204,9 +205,12 @@ static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task)
         * No lock is needed, since the task isn't on tasklist yet,
         * so it can't be moved to another cgroup, which means the
         * freezer won't be removed and will be valid during this
-        * function call.
+        * function call.  Nevertheless, apply RCU read-side critical
+        * section to suppress RCU lockdep false positives.
         */
+       rcu_read_lock();
        freezer = task_freezer(task);
+       rcu_read_unlock();
 
        /*
         * The root cgroup is non-freezable, so we can skip the