diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2015-11-11 17:33:39 +0100 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2015-11-16 17:27:24 +0100 |
commit | 555fa0fa618b846c5b38406347b7d53ace320ac6 (patch) | |
tree | de747c0b36b8eb74d10f99049691c4bc471c2bc2 /fs/orangefs/file.c | |
parent | Orangefs: Merge tag 'v4.4-rc1' into for-next (diff) | |
download | linux-555fa0fa618b846c5b38406347b7d53ace320ac6.tar.xz linux-555fa0fa618b846c5b38406347b7d53ace320ac6.zip |
fs: out of bounds on stack in iov_iter_advance
On Wed, Nov 11, 2015 at 10:19:48AM +0000, Al Viro wrote:
> I'll cook the minimal fixup for API change after I get some sleep and
> send it your way, unless somebody gets there first...
This should do it - switches ->ioctl() to pvfs2_inode_[gs]etxattr() and
converts xattr_handler ->[gs]et() to new API.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/file.c')
-rw-r--r-- | fs/orangefs/file.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 78a46968a994..3a8140f289f6 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -506,11 +506,10 @@ static long pvfs2_ioctl(struct file *file, unsigned int cmd, unsigned long arg) */ if (cmd == FS_IOC_GETFLAGS) { val = 0; - ret = pvfs2_xattr_get_default(file->f_path.dentry, - "user.pvfs2.meta_hint", - &val, - sizeof(val), - 0); + ret = pvfs2_inode_getxattr(file_inode(file), + PVFS2_XATTR_NAME_DEFAULT_PREFIX, + "user.pvfs2.meta_hint", + &val, sizeof(val)); if (ret < 0 && ret != -ENODATA) return ret; else if (ret == -ENODATA) @@ -540,12 +539,10 @@ static long pvfs2_ioctl(struct file *file, unsigned int cmd, unsigned long arg) gossip_debug(GOSSIP_FILE_DEBUG, "pvfs2_ioctl: FS_IOC_SETFLAGS: %llu\n", (unsigned long long)val); - ret = pvfs2_xattr_set_default(file->f_path.dentry, - "user.pvfs2.meta_hint", - &val, - sizeof(val), - 0, - 0); + ret = pvfs2_inode_setxattr(file_inode(file), + PVFS2_XATTR_NAME_DEFAULT_PREFIX, + "user.pvfs2.meta_hint", + &val, sizeof(val), 0); } return ret; |