lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 16 Jul 2007 01:26:31 -0700 From: Mingming Cao <cmm@...ibm.com> To: Andrew Morton <akpm@...ux-foundation.org> Cc: "Cédric "Augonnet\"" <cedric.augonnet@...il.com>, linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org, linux-ext4@...r.kernel.org Subject: Re: [EXT4 set 6][PATCH 1/1]Export jbd stats through procfs On Tue, 2007-07-10 at 21:42 -0700, Andrew Morton wrote: > On Tue, 10 Jul 2007 23:21:49 -0400 "Cédric Augonnet" <cedric.augonnet@...il.com> wrote: > > > 2007/7/10, Andrew Morton <akpm@...ux-foundation.org>: > > > > Hi all, > > > > > > + size = sizeof(struct transaction_stats_s); > > > > + s->stats = kmalloc(size, GFP_KERNEL); > > > > + if (s == NULL) { > > > > + kfree(s); > > > > + return -EIO; > > > > > > ENOMEM > > > > I'm sorry if i missed some point, but i just don't see the use of such > > a kfree here, not sure Andrew meant you should only return ENOMEM > > instead, but why issuing those kfree(NULL), instead of just a if (!s) > > return ENOMEM ? > > > > You found a bug. It was meant to be > > if (s->stats == NULL) > > The incremental fix patch is attached just FYI. It will be folded to the parent patch once the parent patch is being updated. --- fs/jbd2/journal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.22/fs/jbd2/journal.c =================================================================== --- linux-2.6.22.orig/fs/jbd2/journal.c 2007-07-16 00:05:03.000000000 -0700 +++ linux-2.6.22/fs/jbd2/journal.c 2007-07-16 00:05:59.000000000 -0700 @@ -751,7 +751,7 @@ static int jbd2_seq_history_open(struct return -EIO; size = sizeof(struct transaction_stats_s) * journal->j_history_max; s->stats = kmalloc(size, GFP_KERNEL); - if (s == NULL) { + if (s->stats == NULL) { kfree(s); return -EIO; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists