mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Phillip Lougher <phillip@lougher.demon.co.uk>
To: Linux Kernel Development <linux-kernel@vger.kernel.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 2/4] squashfs: fix warn_on when root inode is corrupted
Date: Fri, 23 Apr 2010 03:18:08 +0100	[thread overview]
Message-ID: <4BD10360.8020104@lougher.demon.co.uk> (raw)


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

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
---
  fs/squashfs/super.c |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c
index 3550aec..07ceeb8 100644
--- a/fs/squashfs/super.c
+++ b/fs/squashfs/super.c
@@ -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);
-- 
1.6.3.3


                 reply	other threads:[~2010-04-23  2:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BD10360.8020104@lougher.demon.co.uk \
    --to=phillip@lougher.demon.co.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®