]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/cgroup.c
cgroups: avoid accessing uninitialized data in failure path
[linux-2.6-omap-h63xx.git] / kernel / cgroup.c
index a3415507bd0a46f666a01ce2534c6f5b07c33268..2606d0fb4e54e8f120618328c7b72c01634dc35d 100644 (file)
@@ -1024,7 +1024,7 @@ static int cgroup_get_sb(struct file_system_type *fs_type,
                if (ret == -EBUSY) {
                        mutex_unlock(&cgroup_mutex);
                        mutex_unlock(&inode->i_mutex);
-                       goto drop_new_super;
+                       goto free_cg_links;
                }
 
                /* EBUSY should be the only error here */
@@ -1073,10 +1073,11 @@ static int cgroup_get_sb(struct file_system_type *fs_type,
 
        return simple_set_mnt(mnt, sb);
 
+ free_cg_links:
+       free_cg_links(&tmp_cg_links);
  drop_new_super:
        up_write(&sb->s_umount);
        deactivate_super(sb);
-       free_cg_links(&tmp_cg_links);
        return ret;
 }