Loading fs/exec.c +0 −8 Original line number Diff line number Diff line Loading @@ -486,8 +486,6 @@ struct file *open_exec(const char *name) if (!(nd.mnt->mnt_flags & MNT_NOEXEC) && S_ISREG(inode->i_mode)) { int err = vfs_permission(&nd, MAY_EXEC); if (!err && !(inode->i_mode & 0111)) err = -EACCES; file = ERR_PTR(err); if (!err) { file = nameidata_to_filp(&nd, O_RDONLY); Loading Loading @@ -922,12 +920,6 @@ int prepare_binprm(struct linux_binprm *bprm) int retval; mode = inode->i_mode; /* * Check execute perms again - if the caller has CAP_DAC_OVERRIDE, * generic_permission lets a non-executable through */ if (!(mode & 0111)) /* with at least _one_ execute bit set */ return -EACCES; if (bprm->file->f_op == NULL) return -EACCES; Loading fs/lockd/svcsubs.c +9 −6 Original line number Diff line number Diff line Loading @@ -237,19 +237,22 @@ static int nlm_traverse_files(struct nlm_host *host, int action) { struct nlm_file *file, **fp; int i; int i, ret = 0; mutex_lock(&nlm_file_mutex); for (i = 0; i < FILE_NRHASH; i++) { fp = nlm_files + i; while ((file = *fp) != NULL) { file->f_count++; mutex_unlock(&nlm_file_mutex); /* Traverse locks, blocks and shares of this file * and update file->f_locks count */ if (nlm_inspect_file(host, file, action)) { mutex_unlock(&nlm_file_mutex); return 1; } if (nlm_inspect_file(host, file, action)) ret = 1; mutex_lock(&nlm_file_mutex); file->f_count--; /* No more references to this file. Let go of it. */ if (!file->f_blocks && !file->f_locks && !file->f_shares && !file->f_count) { Loading @@ -262,7 +265,7 @@ nlm_traverse_files(struct nlm_host *host, int action) } } mutex_unlock(&nlm_file_mutex); return 0; return ret; } /* Loading fs/namei.c +10 −1 Original line number Diff line number Diff line Loading @@ -227,10 +227,10 @@ int generic_permission(struct inode *inode, int mask, int permission(struct inode *inode, int mask, struct nameidata *nd) { umode_t mode = inode->i_mode; int retval, submask; if (mask & MAY_WRITE) { umode_t mode = inode->i_mode; /* * Nobody gets write access to a read-only fs. Loading @@ -247,6 +247,13 @@ int permission(struct inode *inode, int mask, struct nameidata *nd) } /* * MAY_EXEC on regular files requires special handling: We override * filesystem execute permissions if the mode bits aren't set. */ if ((mask & MAY_EXEC) && S_ISREG(mode) && !(mode & S_IXUGO)) return -EACCES; /* Ordinary permission routines do not understand MAY_APPEND. */ submask = mask & ~MAY_APPEND; if (inode->i_op && inode->i_op->permission) Loading Loading @@ -1767,6 +1774,8 @@ struct dentry *lookup_create(struct nameidata *nd, int is_dir) if (nd->last_type != LAST_NORM) goto fail; nd->flags &= ~LOOKUP_PARENT; nd->flags |= LOOKUP_CREATE; nd->intent.open.flags = O_EXCL; /* * Do the final lookup. Loading fs/nfs/file.c +7 −1 Original line number Diff line number Diff line Loading @@ -312,7 +312,13 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset) static int nfs_release_page(struct page *page, gfp_t gfp) { if (gfp & __GFP_FS) return !nfs_wb_page(page->mapping->host, page); else /* * Avoid deadlock on nfs_wait_on_request(). */ return 0; } const struct address_space_operations nfs_file_aops = { Loading fs/nfs/idmap.c +1 −3 Original line number Diff line number Diff line Loading @@ -130,9 +130,7 @@ nfs_idmap_delete(struct nfs4_client *clp) if (!idmap) return; dput(idmap->idmap_dentry); idmap->idmap_dentry = NULL; rpc_unlink(idmap->idmap_path); rpc_unlink(idmap->idmap_dentry); clp->cl_idmap = NULL; kfree(idmap); } Loading Loading
fs/exec.c +0 −8 Original line number Diff line number Diff line Loading @@ -486,8 +486,6 @@ struct file *open_exec(const char *name) if (!(nd.mnt->mnt_flags & MNT_NOEXEC) && S_ISREG(inode->i_mode)) { int err = vfs_permission(&nd, MAY_EXEC); if (!err && !(inode->i_mode & 0111)) err = -EACCES; file = ERR_PTR(err); if (!err) { file = nameidata_to_filp(&nd, O_RDONLY); Loading Loading @@ -922,12 +920,6 @@ int prepare_binprm(struct linux_binprm *bprm) int retval; mode = inode->i_mode; /* * Check execute perms again - if the caller has CAP_DAC_OVERRIDE, * generic_permission lets a non-executable through */ if (!(mode & 0111)) /* with at least _one_ execute bit set */ return -EACCES; if (bprm->file->f_op == NULL) return -EACCES; Loading
fs/lockd/svcsubs.c +9 −6 Original line number Diff line number Diff line Loading @@ -237,19 +237,22 @@ static int nlm_traverse_files(struct nlm_host *host, int action) { struct nlm_file *file, **fp; int i; int i, ret = 0; mutex_lock(&nlm_file_mutex); for (i = 0; i < FILE_NRHASH; i++) { fp = nlm_files + i; while ((file = *fp) != NULL) { file->f_count++; mutex_unlock(&nlm_file_mutex); /* Traverse locks, blocks and shares of this file * and update file->f_locks count */ if (nlm_inspect_file(host, file, action)) { mutex_unlock(&nlm_file_mutex); return 1; } if (nlm_inspect_file(host, file, action)) ret = 1; mutex_lock(&nlm_file_mutex); file->f_count--; /* No more references to this file. Let go of it. */ if (!file->f_blocks && !file->f_locks && !file->f_shares && !file->f_count) { Loading @@ -262,7 +265,7 @@ nlm_traverse_files(struct nlm_host *host, int action) } } mutex_unlock(&nlm_file_mutex); return 0; return ret; } /* Loading
fs/namei.c +10 −1 Original line number Diff line number Diff line Loading @@ -227,10 +227,10 @@ int generic_permission(struct inode *inode, int mask, int permission(struct inode *inode, int mask, struct nameidata *nd) { umode_t mode = inode->i_mode; int retval, submask; if (mask & MAY_WRITE) { umode_t mode = inode->i_mode; /* * Nobody gets write access to a read-only fs. Loading @@ -247,6 +247,13 @@ int permission(struct inode *inode, int mask, struct nameidata *nd) } /* * MAY_EXEC on regular files requires special handling: We override * filesystem execute permissions if the mode bits aren't set. */ if ((mask & MAY_EXEC) && S_ISREG(mode) && !(mode & S_IXUGO)) return -EACCES; /* Ordinary permission routines do not understand MAY_APPEND. */ submask = mask & ~MAY_APPEND; if (inode->i_op && inode->i_op->permission) Loading Loading @@ -1767,6 +1774,8 @@ struct dentry *lookup_create(struct nameidata *nd, int is_dir) if (nd->last_type != LAST_NORM) goto fail; nd->flags &= ~LOOKUP_PARENT; nd->flags |= LOOKUP_CREATE; nd->intent.open.flags = O_EXCL; /* * Do the final lookup. Loading
fs/nfs/file.c +7 −1 Original line number Diff line number Diff line Loading @@ -312,7 +312,13 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset) static int nfs_release_page(struct page *page, gfp_t gfp) { if (gfp & __GFP_FS) return !nfs_wb_page(page->mapping->host, page); else /* * Avoid deadlock on nfs_wait_on_request(). */ return 0; } const struct address_space_operations nfs_file_aops = { Loading
fs/nfs/idmap.c +1 −3 Original line number Diff line number Diff line Loading @@ -130,9 +130,7 @@ nfs_idmap_delete(struct nfs4_client *clp) if (!idmap) return; dput(idmap->idmap_dentry); idmap->idmap_dentry = NULL; rpc_unlink(idmap->idmap_path); rpc_unlink(idmap->idmap_dentry); clp->cl_idmap = NULL; kfree(idmap); } Loading