/*
* 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)
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),
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);
#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(