From: Brian Gerst <bgerst@didntduck.org>
To: Andrew Morton <akpm@zip.com.au>
Cc: lkml <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@transmeta.com>,
davej@suse.de
Subject: Re: [patch] ext2_fill_super breakage
Date: Thu, 28 Mar 2002 17:45:46 -0500 [thread overview]
Message-ID: <3CA39D1A.4050106@didntduck.org> (raw)
In-Reply-To: <3CA2C68E.5B8C4176@zip.com.au>
[-- Attachment #1: Type: text/plain, Size: 341 bytes --]
Andrew Morton wrote:
> In 2.5.7 there is a thinko in the allocation and initialisation
> of the fs-private superblock for ext2. It's passing the wrong type
> to the sizeof operator (which of course gives the wrong size)
> when allocating and clearing the memory.
Same bug with bfs patch (only in -dj tree so far).
--
Brian Gerst
[-- Attachment #2: sb-bfs-2 --]
[-- Type: text/plain, Size: 533 bytes --]
diff -urN linux-2.5.7-dj2/fs/bfs/inode.c linux/fs/bfs/inode.c
--- linux-2.5.7-dj2/fs/bfs/inode.c Thu Mar 28 16:34:37 2002
+++ linux/fs/bfs/inode.c Thu Mar 28 16:35:43 2002
@@ -292,11 +292,11 @@
int i, imap_len;
struct bfs_sb_info * info;
- info = kmalloc(sizeof(struct bfs_super_block), GFP_KERNEL);
+ info = kmalloc(sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
s->u.generic_sbp = info;
- memset(info, 0, sizeof(struct bfs_super_block));
+ memset(info, 0, sizeof(*info));
sb_set_blocksize(s, BFS_BSIZE);
prev parent reply other threads:[~2002-03-28 22:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-28 7:30 [patch] ext2_fill_super breakage Andrew Morton
2002-03-28 13:34 ` Brian Gerst
2002-03-28 13:46 ` Rob Landley
2002-03-28 13:50 ` Jos Hulzink
2002-03-28 17:26 ` Bill Davidsen
2002-03-28 17:27 ` Andrew Morton
2002-03-28 18:13 ` Brian Gerst
2002-03-28 14:21 ` Alexander Viro
2002-03-28 14:36 ` Nikita Danilov
2002-03-28 14:48 ` Alexander Viro
2002-03-28 14:51 ` Nikita Danilov
2002-03-28 15:20 ` Alexander Viro
2002-03-28 14:50 ` Arjan van de Ven
2002-03-28 15:01 ` Nikita Danilov
2002-03-28 17:45 ` Andrew Morton
2002-03-28 23:51 ` Alexander Viro
2002-03-29 0:25 ` Andrew Morton
2002-03-29 5:14 ` Andreas Dilger
2002-03-29 8:06 ` Guest section DW
2002-03-29 15:45 ` Bill Davidsen
2002-03-29 0:42 ` Bill Davidsen
2002-03-28 22:45 ` Brian Gerst [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=3CA39D1A.4050106@didntduck.org \
--to=bgerst@didntduck.org \
--cc=akpm@zip.com.au \
--cc=davej@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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