From: Fabian Frederick Date: Fri, 8 Aug 2014 21:20:31 +0000 (-0700) Subject: fs/befs/linuxvfs.c: check superblock before dump operation X-Git-Tag: omap-for-v3.17/fixes-against-rc2~116^2~158 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e19189ef8d1fce44f3acdf0fe9846cff9b37c78;p=pandora-kernel.git 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 Reported-by: Fengguang Wu Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed