From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH 1/4] ext4: minor fix in jbd2 stats kmalloc failure case
Date: Mon, 03 Dec 2007 17:29:43 -0600 [thread overview]
Message-ID: <47549167.4000107@redhat.com> (raw)
(Mingming: these 4 patches can apply after
jbd-stats-through-procfs-with-external-journal-oops-fix.patch)
---------------------------------------------------------------------
The other instance of this problem was caught, but this one got missed:
Free the correct pointer on s->stats allocation failure in jbd2_seq_info_open
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
Index: linux-2.6.24-rc3/fs/jbd2/journal.c
===================================================================
--- linux-2.6.24-rc3.orig/fs/jbd2/journal.c
+++ linux-2.6.24-rc3/fs/jbd2/journal.c
@@ -850,7 +850,7 @@ static int jbd2_seq_info_open(struct ino
return -EIO;
size = sizeof(struct transaction_stats_s);
s->stats = kmalloc(size, GFP_KERNEL);
- if (s == NULL) {
+ if (s->stats == NULL) {
kfree(s);
return -EIO;
}
next reply other threads:[~2007-12-03 23:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 23:29 Eric Sandeen [this message]
2007-12-04 0:23 ` [PATCH 1/4] ext4: minor fix in jbd2 stats kmalloc failure case Mingming Cao
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=47549167.4000107@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-ext4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.