aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/audit_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/audit_tree.c')
-rw-r--r--kernel/audit_tree.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index 4b05bd9479db..a4bdd2a18f1a 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -720,6 +720,8 @@ int audit_tag_tree(char *old, char *new)
720 struct vfsmount *mnt; 720 struct vfsmount *mnt;
721 struct dentry *dentry; 721 struct dentry *dentry;
722 int err; 722 int err;
723 int cpu = get_cpu();
724 put_cpu();
723 725
724 err = kern_path(new, 0, &path); 726 err = kern_path(new, 0, &path);
725 if (err) 727 if (err)
@@ -761,15 +763,15 @@ int audit_tag_tree(char *old, char *new)
761 continue; 763 continue;
762 } 764 }
763 765
764 spin_lock(&vfsmount_lock); 766 vfsmount_read_lock(cpu);
765 if (!is_under(mnt, dentry, &path)) { 767 if (!is_under(mnt, dentry, &path)) {
766 spin_unlock(&vfsmount_lock); 768 vfsmount_read_unlock(cpu);
767 path_put(&path); 769 path_put(&path);
768 put_tree(tree); 770 put_tree(tree);
769 mutex_lock(&audit_filter_mutex); 771 mutex_lock(&audit_filter_mutex);
770 continue; 772 continue;
771 } 773 }
772 spin_unlock(&vfsmount_lock); 774 vfsmount_read_unlock(cpu);
773 path_put(&path); 775 path_put(&path);
774 776
775 list_for_each_entry(p, &list, mnt_list) { 777 list_for_each_entry(p, &list, mnt_list) {