Skip to contentSkip to conversation

squashfs-squashfs_read_data-need-to-check-if-the-length-is-0.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Dec 7, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: squashfs: squashfs_read_data need to check if the length is 0
has been removed from the -mm tree. Its filename was
squashfs-squashfs_read_data-need-to-check-if-the-length-is-0.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Lizhi Xu <[email protected]>
Subject: squashfs: squashfs_read_data need to check if the length is 0
Date: Thu, 16 Nov 2023 11:13:52 +0800

When the length passed in is 0, the pagemap_scan_test_walk() caller should bail. This error causes at least a WARN_ON().

---

 fs/squashfs/block.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/squashfs/block.c renamed from fs/squashfs/block.c~squashfs-squashfs_read_data-need-to-check-if-the-length-is-0 +1 -1
@@ -321,7 +321,7 @@ int squashfs_read_data(struct super_bloc
 		TRACE("Block @ 0x%llx, %scompressed size %d\n", index - 2,
 		      compressed ? "" : "un", length);
 	}
-	if (length < 0 || length > output->length ||
+	if (length <= 0 || length > output->length ||
 			(index + length) > msblk->bytes_used) {
 		res = -EIO;
 		goto out;

_

Patches currently in -mm which might be from [email protected] are