X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fxfs%2Flinux-2.6%2Fxfs_ioctl.c;h=c1682ceef73507351d4e6c647d0de471a878fe02;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=f29c51059ce579092b65b7f504c61152db07ece5;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index f29c51059..c1682ceef 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -270,7 +270,7 @@ xfs_vget_fsop_handlereq( /* * Get the XFS inode, building a vnode to go with it. */ - error = xfs_iget(mp, NULL, ino, XFS_ILOCK_SHARED, &ip, 0); + error = xfs_iget(mp, NULL, ino, 0, XFS_ILOCK_SHARED, &ip, 0); if (error) return error; if (ip == NULL) @@ -499,7 +499,7 @@ xfs_attrmulti_by_handle( xfs_fsop_attrmulti_handlereq_t am_hreq; struct inode *inode; vnode_t *vp; - int i, size; + unsigned int i, size; error = xfs_vget_fsop_handlereq(mp, parinode, CAP_SYS_ADMIN, arg, sizeof(xfs_fsop_attrmulti_handlereq_t), @@ -509,6 +509,11 @@ xfs_attrmulti_by_handle( return -error; size = am_hreq.opcount * sizeof(attr_multiop_t); + if (!size || size > 16 * PAGE_SIZE) { + VN_RELE(vp); + return -XFS_ERROR(E2BIG); + } + ops = (xfs_attr_multiop_t *)kmalloc(size, GFP_KERNEL); if (!ops) { VN_RELE(vp); @@ -1009,7 +1014,7 @@ xfs_ioc_fsgeometry( #define LINUX_XFLAG_NODUMP 0x00000040 /* do not dump file */ #define LINUX_XFLAG_NOATIME 0x00000080 /* do not update atime */ #define LINUX_XFLAG_BARRIER 0x00004000 /* chroot() barrier */ -#define LINUX_XFLAG_IUNLINK 0x00008000 /* Immutable unlink */ +#define LINUX_XFLAG_IUNLINK 0x00008000 /* immutable unlink */ STATIC unsigned int xfs_merge_ioc_xflags(