Skip to contentSkip to conversation

squashfs: fix warn_on when root inode is corrupted

PATCH New Phillip Lougher 1 participant 1 message Apr 23, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/4 squashfs: fix warn_on when root inode is corrupted

Fix warn_on triggered by mounting a fsfuzzer corrupted file system, where the root inode has been corrupted.

---
 fs/squashfs/super.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
fs/squashfs/super.c +2 -1
index 3550aec..07ceeb8 100644
@@ -275,7 +275,8 @@ allocate_root:
 
 	err = squashfs_read_inode(root, root_inode);
 	if (err) {
-		iget_failed(root);
+		make_bad_inode(root);
+		iput(root);
 		goto failed_mount;
 	}
 	insert_inode_hash(root);
Signature · 1 line
1.6.3.3