linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Sami Liedes <sami.liedes@iki.fi>, linux-ext4@vger.kernel.org
Subject: Re: Valgrind-detected issues in e2fsck on corrupted filesystems
Date: Mon, 27 Oct 2014 10:10:00 -0700	[thread overview]
Message-ID: <20141027171000.GA10057@birch.djwong.org> (raw)
In-Reply-To: <20141026104708.GA31873@sli.dy.fi>

On Sun, Oct 26, 2014 at 12:47:09PM +0200, Sami Liedes wrote:
> On Mon, Oct 20, 2014 at 01:57:36PM -0700, Darrick J. Wong wrote:
> > Thanks for catching these!  I'll have patches out shortly.
> 
> Great! With your patches applied I could no longer get any valgrind
> errors on ext4 during overnight fuzz testing.
> 
> Here's one more I found which only shows on ext[23], with or without
> your recent patches. It seems that the error message "Unexpected block
> in HTREE directory inode %d (%q)" is printed with uninitialized values
> for both the %d and the %q conversions.

I think the following patch fixes this problem; can you give it a spin?

--D
---
From: Darrick J. Wong <darrick.wong@oracle.com>
Subject: [PATCH] e2fsck: fix reporting of unknown htree block inode number

Sami Liedes reports that e2fsck fails to report the correct directory
inode number during a pass2 check for unexpected HTREE blocks.
Provide the inode number in the problem report.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: Sami Liedes <sami.liedes@iki.fi>
---
 e2fsck/pass2.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
index fa17f20..f645229 100644
--- a/e2fsck/pass2.c
+++ b/e2fsck/pass2.c
@@ -1006,6 +1006,7 @@ inline_read_fail:
 	dx_dir = e2fsck_get_dx_dir_info(ctx, ino);
 	if (dx_dir && dx_dir->numblocks) {
 		if (db->blockcnt >= dx_dir->numblocks) {
+			pctx.dir = ino;
 			if (fix_problem(ctx, PR_2_UNEXPECTED_HTREE_BLOCK,
 					&pctx)) {
 				clear_htree(ctx, ino);

  reply	other threads:[~2014-10-27 17:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-18 23:23 Valgrind-detected issues in e2fsck on corrupted filesystems Sami Liedes
2014-10-20 20:57 ` Darrick J. Wong
2014-10-26 10:47   ` Sami Liedes
2014-10-27 17:10     ` Darrick J. Wong [this message]
2014-10-27 22:10       ` Sami Liedes

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=20141027171000.GA10057@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sami.liedes@iki.fi \
    /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;
as well as URLs for NNTP newsgroup(s).