From: Andrew Morton <akpm@osdl.org>
To: Alberto Bertogli <albertogli@telpin.com.ar>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.0-test5/6 (and probably 7 too) size-4096 memory leak
Date: Thu, 16 Oct 2003 22:56:53 -0700 [thread overview]
Message-ID: <20031016225653.7f3ff0c3.akpm@osdl.org> (raw)
In-Reply-To: <20031016025554.GH4292@telpin.com.ar>
Alberto Bertogli <albertogli@telpin.com.ar> wrote:
>
> I want to report a memory leak for 2.6.0-test5 that I've noticed today on
> a mail server after 32 days of uptime.
'twas in ext3.
fs/jbd/commit.c | 8 ++++++++
fs/jbd/journal.c | 2 ++
2 files changed, 10 insertions(+)
diff -puN fs/jbd/commit.c~jbd-leak-fix fs/jbd/commit.c
--- 25/fs/jbd/commit.c~jbd-leak-fix 2003-10-16 21:47:28.000000000 -0700
+++ 25-akpm/fs/jbd/commit.c 2003-10-16 22:10:58.000000000 -0700
@@ -172,6 +172,14 @@ void journal_commit_transaction(journal_
while (commit_transaction->t_reserved_list) {
jh = commit_transaction->t_reserved_list;
JBUFFER_TRACE(jh, "reserved, unused: refile");
+ /*
+ * A journal_get_undo_access()+journal_release_buffer() may
+ * leave undo-committed data.
+ */
+ if (jh->b_committed_data) {
+ kfree(jh->b_committed_data);
+ jh->b_committed_data = NULL;
+ }
journal_refile_buffer(journal, jh);
}
diff -puN fs/jbd/journal.c~jbd-leak-fix fs/jbd/journal.c
--- 25/fs/jbd/journal.c~jbd-leak-fix 2003-10-16 22:11:45.000000000 -0700
+++ 25-akpm/fs/jbd/journal.c 2003-10-16 22:11:56.000000000 -0700
@@ -1729,6 +1729,8 @@ static void __journal_remove_journal_hea
J_ASSERT_BH(bh, buffer_jbd(bh));
J_ASSERT_BH(bh, jh2bh(jh) == bh);
BUFFER_TRACE(bh, "remove journal_head");
+ J_ASSERT_BH(bh, !jh->b_frozen_data);
+ J_ASSERT_BH(bh, !jh->b_committed_data);
bh->b_private = NULL;
jh->b_bh = NULL; /* debug, really */
clear_buffer_jbd(bh);
_
prev parent reply other threads:[~2003-10-17 5:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-16 2:55 Alberto Bertogli
2003-10-16 4:19 ` Andrew Morton
2003-10-16 4:43 ` William Lee Irwin III
2003-10-16 4:58 ` Andrew Morton
2003-10-16 5:40 ` Manfred Spraul
2003-10-16 6:31 ` Andrew Morton
2003-10-16 15:13 ` Manfred Spraul
2003-10-17 5:56 ` Andrew Morton [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=20031016225653.7f3ff0c3.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=albertogli@telpin.com.ar \
--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®