correction to super_block cleanups
Subsystems (2)
PATCH 1/1 correction to super_block cleanups
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.
Signature · 1 line
Brian Gerst
fs/cramfs/inode.c +1 -0
@@ -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 );
fs/minix/inode.c +1 -0
@@ -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. */
fs/ext2/super.c +1 -0
@@ -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
fs/ncpfs/inode.c +2 -0
@@ -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;