From: Willy TARREAU <willy@w.ods.org>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: ext2-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
marcelo@kvack.org, akpm@osdl.org
Subject: Re: [PATCH] Fix memory leak when the ext3's journal file is corrupted
Date: Tue, 23 May 2006 22:13:26 +0200 [thread overview]
Message-ID: <20060523201326.GA478@w.ods.org> (raw)
In-Reply-To: <E1Fhx2I-0001lb-Gk@candygram.thunk.org>
Hi Theodore,
On Sun, May 21, 2006 at 07:08:34PM -0400, Theodore Ts'o wrote:
>
> Fix memory leak when the ext3's journal file is corrupted
>
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
>
> Index: linux-2.6/fs/jbd/recovery.c
> ===================================================================
> --- linux-2.6.orig/fs/jbd/recovery.c 2006-05-21 18:39:27.000000000 -0400
> +++ linux-2.6/fs/jbd/recovery.c 2006-05-21 18:39:34.000000000 -0400
> @@ -531,6 +531,7 @@
> default:
> jbd_debug(3, "Unrecognised magic %d, end of scan.\n",
> blocktype);
> + brelse(bh);
> goto done;
> }
> }
It seems to me that this one is a clear candidate for 2.4 too, isn't it ?
While reviewing diffs between 2.4 and 2.6 on this file, I also found this
patch from Andrew two years ago which also seems appropriate for 2.4 :
[PATCH] JBD: avoid panic on corrupted journal superblock
Don't panic if the journal superblock is wrecked: just fail the mount.
--- 1.11/fs/jbd/recovery.c 2006-05-23 20:44:53 -07:00
+++ 1.12/fs/jbd/recovery.c 2006-05-23 20:44:53 -07:00
@@ -137,7 +137,10 @@
*bhp = NULL;
- J_ASSERT (offset < journal->j_maxlen);
+ if (offset >= journal->j_maxlen) {
+ printk(KERN_ERR "JBD: corrupted journal superblock\n");
+ return -EIO;
+ }
err = journal_bmap(journal, offset, &blocknr);
I'm about to queue them both for Marcelo, do you have any objection ?
Thanks in advance,
Willy
prev parent reply other threads:[~2006-05-23 20:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-21 23:08 [PATCH] Fix memory leak when the ext3's journal file is corrupted Theodore Ts'o
2006-05-23 20:13 ` Willy TARREAU [this message]
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=20060523201326.GA478@w.ods.org \
--to=willy@w.ods.org \
--cc=akpm@osdl.org \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@kvack.org \
--cc=tytso@mit.edu \
/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