The patch titled Subject: fs/befs/linuxvfs.c: check superblock before dump operation has been removed from the -mm tree. Its filename was fs-befs-linuxvfsc-check-superblock-before-dump-operation.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Fabian Frederick <fabf@xxxxxxxxx> Subject: fs/befs/linuxvfs.c: check superblock before dump operation befs_dump_super_block was called between befs_load_sb and befs_check_sb. It has been reported to crash (5/900) with null block testing. This patch loads, checks and only dump superblock if it's a valid one then brelse bh. (befs_dump_super_block uses disk_sb (bh->b_data) so it seems we need to call it before brelse(bh) but I don't know why befs_check_sb was called after brelse. Another thing I don't understand is why this problem appears now). Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx> Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx> Cc: Joe Perches <joe@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/befs/linuxvfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff -puN fs/befs/linuxvfs.c~fs-befs-linuxvfsc-check-superblock-before-dump-operation fs/befs/linuxvfs.c --- a/fs/befs/linuxvfs.c~fs-befs-linuxvfsc-check-superblock-before-dump-operation +++ a/fs/befs/linuxvfs.c @@ -832,16 +832,14 @@ befs_fill_super(struct super_block *sb, (befs_super_block *) ((void *) bh->b_data + x86_sb_off); } - if (befs_load_sb(sb, disk_sb) != BEFS_OK) + if ((befs_load_sb(sb, disk_sb) != BEFS_OK) || + (befs_check_sb(sb) != BEFS_OK)) goto unacquire_bh; befs_dump_super_block(sb, disk_sb); brelse(bh); - if (befs_check_sb(sb) != BEFS_OK) - goto unacquire_priv_sbp; - if( befs_sb->num_blocks > ~((sector_t)0) ) { befs_error(sb, "blocks count: %llu " "is larger than the host can use", _ Patches currently in -mm which might be from fabf@xxxxxxxxx are origin.patch fs-cifs-remove-obsolete-__constant.patch fs-cifs-filec-replace-countsize-kzalloc-by-kcalloc.patch fs-cifs-smb2filec-replace-countsize-kzalloc-by-kcalloc.patch fs-ext4-fsyncc-generic_file_fsync-call-based-on-barrier-flag.patch fs-isofs-logging-clean-up.patch fs-isofs-logging-clean-up-fix.patch linux-next.patch kernel-posix-timersc-code-clean-up.patch kernel-posix-timersc-code-clean-up-checkpatch-fixes.patch kernel-kprobesc-convert-printk-to-pr_foo.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html