diff options
Diffstat (limited to 'kernel/audit_tree.c')
| -rw-r--r-- | kernel/audit_tree.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index f4fcf58f20f8..9ef5e0aacc3c 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
| @@ -549,8 +549,8 @@ void audit_trim_trees(void) | |||
| 549 | if (err) | 549 | if (err) |
| 550 | goto skip_it; | 550 | goto skip_it; |
| 551 | 551 | ||
| 552 | root_mnt = collect_mounts(nd.mnt, nd.dentry); | 552 | root_mnt = collect_mounts(nd.path.mnt, nd.path.dentry); |
| 553 | path_release(&nd); | 553 | path_put(&nd.path); |
| 554 | if (!root_mnt) | 554 | if (!root_mnt) |
| 555 | goto skip_it; | 555 | goto skip_it; |
| 556 | 556 | ||
| @@ -583,17 +583,17 @@ skip_it: | |||
| 583 | static int is_under(struct vfsmount *mnt, struct dentry *dentry, | 583 | static int is_under(struct vfsmount *mnt, struct dentry *dentry, |
| 584 | struct nameidata *nd) | 584 | struct nameidata *nd) |
| 585 | { | 585 | { |
| 586 | if (mnt != nd->mnt) { | 586 | if (mnt != nd->path.mnt) { |
| 587 | for (;;) { | 587 | for (;;) { |
| 588 | if (mnt->mnt_parent == mnt) | 588 | if (mnt->mnt_parent == mnt) |
| 589 | return 0; | 589 | return 0; |
| 590 | if (mnt->mnt_parent == nd->mnt) | 590 | if (mnt->mnt_parent == nd->path.mnt) |
| 591 | break; | 591 | break; |
| 592 | mnt = mnt->mnt_parent; | 592 | mnt = mnt->mnt_parent; |
| 593 | } | 593 | } |
| 594 | dentry = mnt->mnt_mountpoint; | 594 | dentry = mnt->mnt_mountpoint; |
| 595 | } | 595 | } |
| 596 | return is_subdir(dentry, nd->dentry); | 596 | return is_subdir(dentry, nd->path.dentry); |
| 597 | } | 597 | } |
| 598 | 598 | ||
| 599 | int audit_make_tree(struct audit_krule *rule, char *pathname, u32 op) | 599 | int audit_make_tree(struct audit_krule *rule, char *pathname, u32 op) |
| @@ -641,8 +641,8 @@ int audit_add_tree_rule(struct audit_krule *rule) | |||
| 641 | err = path_lookup(tree->pathname, 0, &nd); | 641 | err = path_lookup(tree->pathname, 0, &nd); |
| 642 | if (err) | 642 | if (err) |
| 643 | goto Err; | 643 | goto Err; |
| 644 | mnt = collect_mounts(nd.mnt, nd.dentry); | 644 | mnt = collect_mounts(nd.path.mnt, nd.path.dentry); |
| 645 | path_release(&nd); | 645 | path_put(&nd.path); |
| 646 | if (!mnt) { | 646 | if (!mnt) { |
| 647 | err = -ENOMEM; | 647 | err = -ENOMEM; |
| 648 | goto Err; | 648 | goto Err; |
| @@ -701,8 +701,8 @@ int audit_tag_tree(char *old, char *new) | |||
| 701 | err = path_lookup(new, 0, &nd); | 701 | err = path_lookup(new, 0, &nd); |
| 702 | if (err) | 702 | if (err) |
| 703 | return err; | 703 | return err; |
| 704 | tagged = collect_mounts(nd.mnt, nd.dentry); | 704 | tagged = collect_mounts(nd.path.mnt, nd.path.dentry); |
| 705 | path_release(&nd); | 705 | path_put(&nd.path); |
| 706 | if (!tagged) | 706 | if (!tagged) |
| 707 | return -ENOMEM; | 707 | return -ENOMEM; |
| 708 | 708 | ||
| @@ -711,9 +711,9 @@ int audit_tag_tree(char *old, char *new) | |||
| 711 | drop_collected_mounts(tagged); | 711 | drop_collected_mounts(tagged); |
| 712 | return err; | 712 | return err; |
| 713 | } | 713 | } |
| 714 | mnt = mntget(nd.mnt); | 714 | mnt = mntget(nd.path.mnt); |
| 715 | dentry = dget(nd.dentry); | 715 | dentry = dget(nd.path.dentry); |
| 716 | path_release(&nd); | 716 | path_put(&nd.path); |
| 717 | 717 | ||
| 718 | if (dentry == tagged->mnt_root && dentry == mnt->mnt_root) | 718 | if (dentry == tagged->mnt_root && dentry == mnt->mnt_root) |
| 719 | follow_up(&mnt, &dentry); | 719 | follow_up(&mnt, &dentry); |
| @@ -744,13 +744,13 @@ int audit_tag_tree(char *old, char *new) | |||
| 744 | spin_lock(&vfsmount_lock); | 744 | spin_lock(&vfsmount_lock); |
| 745 | if (!is_under(mnt, dentry, &nd)) { | 745 | if (!is_under(mnt, dentry, &nd)) { |
| 746 | spin_unlock(&vfsmount_lock); | 746 | spin_unlock(&vfsmount_lock); |
| 747 | path_release(&nd); | 747 | path_put(&nd.path); |
| 748 | put_tree(tree); | 748 | put_tree(tree); |
| 749 | mutex_lock(&audit_filter_mutex); | 749 | mutex_lock(&audit_filter_mutex); |
| 750 | continue; | 750 | continue; |
| 751 | } | 751 | } |
| 752 | spin_unlock(&vfsmount_lock); | 752 | spin_unlock(&vfsmount_lock); |
| 753 | path_release(&nd); | 753 | path_put(&nd.path); |
| 754 | 754 | ||
| 755 | list_for_each_entry(p, &list, mnt_list) { | 755 | list_for_each_entry(p, &list, mnt_list) { |
| 756 | failed = tag_chunk(p->mnt_root->d_inode, tree); | 756 | failed = tag_chunk(p->mnt_root->d_inode, tree); |
