Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a8861e2 authored by ZhangZhen's avatar ZhangZhen Committed by Jaegeuk Kim
Browse files

f2fs: check the acl's validity before setting



Before setting the acl, call posix_acl_valid() to check if it is
valid or not.

Signed-off-by: default avatarzhangzhen <zhenzhang.zhang@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 6b4afdd7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -203,6 +203,12 @@ static int __f2fs_set_acl(struct inode *inode, int type,
	size_t size = 0;
	int error;

	if (acl) {
		error = posix_acl_valid(acl);
		if (error < 0)
			return error;
	}

	switch (type) {
	case ACL_TYPE_ACCESS:
		name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS;