]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
Revert "UBUNTU: SAUCE: apparmor: fix sleep in critical section"
authorSeth Forshee <seth.forshee@canonical.com>
Wed, 19 Oct 2016 22:13:47 +0000 (17:13 -0500)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 19 Oct 2016 23:25:49 +0000 (18:25 -0500)
BugLink: http://bugs.launchpad.net/bugs/1611078
This reverts commit 63f6655e74fed75e5007bc8aa6447bcd93327036,
which is superseded by later patches.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
security/apparmor/mount.c

index ee07f7650b0162cf5b70e2addbac7fb587747d81..b380e32a607704c428e45258fe757791f36c7114 100644 (file)
@@ -405,6 +405,7 @@ int aa_bind_mount(struct aa_label *label, struct path *path,
                                                   &old_path),
                             old_buffer, &old_name, &info,
                             labels_profile(label)->disconnected);
+       path_put(&old_path);
        if (error)
                goto error;
 
@@ -414,7 +415,6 @@ int aa_bind_mount(struct aa_label *label, struct path *path,
 
 out:
        put_buffers(buffer, old_buffer);
-       path_put(&old_path);
 
        return error;
 
@@ -494,6 +494,7 @@ int aa_move_mount(struct aa_label *label, struct path *path,
                                                   &old_path),
                             old_buffer, &old_name, &info,
                             labels_profile(label)->disconnected);
+       path_put(&old_path);
        if (error)
                goto error;
 
@@ -503,7 +504,6 @@ int aa_move_mount(struct aa_label *label, struct path *path,
 
 out:
        put_buffers(buffer, old_buffer);
-       path_put(&old_path);
 
        return error;
 
@@ -557,6 +557,7 @@ int aa_new_mount(struct aa_label *label, const char *orig_dev_name,
                                                &dev_path),
                                     dev_buffer, &dev_name, &info,
                                     labels_profile(label)->disconnected);
+               path_put(&dev_path);
                if (error)
                        goto error;
        }
@@ -573,8 +574,6 @@ int aa_new_mount(struct aa_label *label, const char *orig_dev_name,
 
 cleanup:
        put_buffers(buffer, dev_buffer);
-       if (requires_dev)
-               path_put(&dev_path);
 
        return error;