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

Commit fd34faf0 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "f2fs: add a condition to detect overflow in f2fs_ioc_gc_range()"

parents dc218641 ae507f78
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2178,9 +2178,9 @@ static int f2fs_ioc_gc_range(struct file *filp, unsigned long arg)
		return -EROFS;

	end = range.start + range.len;
	if (range.start < MAIN_BLKADDR(sbi) || end >= MAX_BLKADDR(sbi)) {
	if (end < range.start || range.start < MAIN_BLKADDR(sbi) ||
					end >= MAX_BLKADDR(sbi))
		return -EINVAL;
	}

	ret = mnt_want_write_file(filp);
	if (ret)