public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] correction to super_block cleanups
@ 2002-03-13  1:12 Brian Gerst
  0 siblings, 0 replies; only message in thread
From: Brian Gerst @ 2002-03-13  1:12 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux-Kernel

[-- 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-03-13  1:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-13  1:12 [PATCH] correction to super_block cleanups Brian Gerst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox