diff options
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 65b3dc844c87..a40685d800a8 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1176,7 +1176,7 @@ static int mount_is_safe(struct path *path) | |||
1176 | if (S_ISLNK(path->dentry->d_inode->i_mode)) | 1176 | if (S_ISLNK(path->dentry->d_inode->i_mode)) |
1177 | return -EPERM; | 1177 | return -EPERM; |
1178 | if (path->dentry->d_inode->i_mode & S_ISVTX) { | 1178 | if (path->dentry->d_inode->i_mode & S_ISVTX) { |
1179 | if (current->uid != path->dentry->d_inode->i_uid) | 1179 | if (current_uid() != path->dentry->d_inode->i_uid) |
1180 | return -EPERM; | 1180 | return -EPERM; |
1181 | } | 1181 | } |
1182 | if (inode_permission(path->dentry->d_inode, MAY_WRITE)) | 1182 | if (inode_permission(path->dentry->d_inode, MAY_WRITE)) |
@@ -1990,7 +1990,7 @@ static struct mnt_namespace *dup_mnt_ns(struct mnt_namespace *mnt_ns, | |||
1990 | if (!new_ns->root) { | 1990 | if (!new_ns->root) { |
1991 | up_write(&namespace_sem); | 1991 | up_write(&namespace_sem); |
1992 | kfree(new_ns); | 1992 | kfree(new_ns); |
1993 | return ERR_PTR(-ENOMEM);; | 1993 | return ERR_PTR(-ENOMEM); |
1994 | } | 1994 | } |
1995 | spin_lock(&vfsmount_lock); | 1995 | spin_lock(&vfsmount_lock); |
1996 | list_add_tail(&new_ns->list, &new_ns->root->mnt_list); | 1996 | list_add_tail(&new_ns->list, &new_ns->root->mnt_list); |