diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/binfmt_flat.c | 2 | ||||
-rw-r--r-- | fs/ramfs/file-nommu.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 7b0265d7f3a8..861141b4f6d6 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -558,7 +558,7 @@ static int load_flat_file(struct linux_binprm * bprm, if (!realdatastart) realdatastart = (unsigned long) -ENOMEM; printk("Unable to allocate RAM for process data, errno %d\n", - (int)-datapos); + (int)-realdatastart); do_munmap(current->mm, textpos, text_len); ret = realdatastart; goto err; diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index 9345a46ffb32..5d258c40a2fd 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c @@ -195,6 +195,11 @@ static int ramfs_nommu_setattr(struct dentry *dentry, struct iattr *ia) unsigned int old_ia_valid = ia->ia_valid; int ret = 0; + /* POSIX UID/GID verification for setting inode attributes */ + ret = inode_change_ok(inode, ia); + if (ret) + return ret; + /* by providing our own setattr() method, we skip this quotaism */ if ((old_ia_valid & ATTR_UID && ia->ia_uid != inode->i_uid) || (old_ia_valid & ATTR_GID && ia->ia_gid != inode->i_gid)) |