From: Brian Gerst <bgerst@didntduck.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] correction to super_block cleanups
Date: Tue, 12 Mar 2002 20:12:21 -0500 [thread overview]
Message-ID: <3C8EA775.3000306@didntduck.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 207 bytes --]
I forgot to zero out the newly allocated memory in the previous patches.
First patch is for the changes included in 2.5.7-pre1, second is
incremental to the ext2 and ncp patches.
--
Brian Gerst
[-- Attachment #2: sb-zeroing-1 --]
[-- Type: text/plain, Size: 715 bytes --]
diff -ruN linux/fs/cramfs/inode.c linux2/fs/cramfs/inode.c
--- linux/fs/cramfs/inode.c Tue Mar 12 17:35:10 2002
+++ linux2/fs/cramfs/inode.c Tue Mar 12 20:01:37 2002
@@ -201,6 +201,7 @@
if (!sbi)
return -ENOMEM;
sb->u.generic_sbp = sbi;
+ memset(sbi, 0, sizeof(struct cramfs_sb_info));
sb_set_blocksize(sb, PAGE_CACHE_SIZE);
diff -ruN linux/fs/minix/inode.c linux2/fs/minix/inode.c
--- linux/fs/minix/inode.c Tue Mar 12 17:35:10 2002
+++ linux2/fs/minix/inode.c Tue Mar 12 20:01:10 2002
@@ -178,6 +178,7 @@
if (!sbi)
return -ENOMEM;
s->u.generic_sbp = sbi;
+ memset(sbi, 0, sizeof(struct minix_sb_info));
/* N.B. These should be compile-time tests.
Unfortunately that is impossible. */
[-- Attachment #3: sb-zeroing-2 --]
[-- Type: text/plain, Size: 705 bytes --]
diff -ruN linux/fs/ext2/super.c linux2/fs/ext2/super.c
--- linux/fs/ext2/super.c Tue Mar 12 19:59:57 2002
+++ linux2/fs/ext2/super.c Tue Mar 12 20:03:16 2002
@@ -469,6 +469,7 @@
if (!sbi)
return -ENOMEM;
sb->u.generic_sbp = sbi;
+ memset(sbi, 0, sizeof(struct ext2_super_block));
/*
* See what the current blocksize for the device is, and
diff -ruN linux/fs/ncpfs/inode.c linux2/fs/ncpfs/inode.c
--- linux/fs/ncpfs/inode.c Tue Mar 12 19:59:51 2002
+++ linux2/fs/ncpfs/inode.c Tue Mar 12 20:04:09 2002
@@ -319,6 +319,8 @@
if (!server)
return -ENOMEM;
sb->u.generic_sbp = server;
+ memset(server, 0, sizeof(struct ncp_server));
+
error = -EFAULT;
if (raw_data == NULL)
goto out;
reply other threads:[~2002-03-13 1:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3C8EA775.3000306@didntduck.org \
--to=bgerst@didntduck.org \
--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