This is a note to let you know that I've just added the patch titled

    cgroup: fix error return value in cgroup_mount()

to the 3.13-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cgroup-fix-error-return-value-in-cgroup_mount.patch
and it can be found in the queue-3.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From eb46bf89696972b856a9adb6aebd5c7b65c266e4 Mon Sep 17 00:00:00 2001
From: Tejun Heo <[email protected]>
Date: Sat, 8 Feb 2014 10:26:33 -0500
Subject: cgroup: fix error return value in cgroup_mount()

From: Tejun Heo <[email protected]>

commit eb46bf89696972b856a9adb6aebd5c7b65c266e4 upstream.

When cgroup_mount() fails to allocate an id for the root, it didn't
set ret before jumping to unlock_drop ending up returning 0 after a
failure.  Fix it.

Signed-off-by: Tejun Heo <[email protected]>
Acked-by: Li Zefan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 kernel/cgroup.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1580,10 +1580,10 @@ static struct dentry *cgroup_mount(struc
                mutex_lock(&cgroup_mutex);
                mutex_lock(&cgroup_root_mutex);
 
-               root_cgrp->id = idr_alloc(&root->cgroup_idr, root_cgrp,
-                                          0, 1, GFP_KERNEL);
-               if (root_cgrp->id < 0)
+               ret = idr_alloc(&root->cgroup_idr, root_cgrp, 0, 1, GFP_KERNEL);
+               if (ret < 0)
                        goto unlock_drop;
+               root_cgrp->id = ret;
 
                /* Check for name clashes with existing mounts */
                ret = -EBUSY;


Patches currently in stable-queue which might be from [email protected] are

queue-3.13/cgroup-use-an-ordered-workqueue-for-cgroup-destruction.patch
queue-3.13/cgroup-update-cgroup_enable_task_cg_lists-to-grab-siglock.patch
queue-3.13/cgroup-fix-error-return-from-cgroup_create.patch
queue-3.13/cgroup-fix-error-return-value-in-cgroup_mount.patch
queue-3.13/cgroup-fix-locking-in-cgroup_cfts_commit.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to