linux-stable/fs/f2fs
Chao Yu bac4eef653 f2fs: avoid crash when trace f2fs_submit_page_mbio event in ra_sum_pages
Previously we allocate pages with no mapping in ra_sum_pages(), so we may
encounter a crash in event trace of f2fs_submit_page_mbio where we access
mapping data of the page.

We'd better allocate pages in bd_inode mapping and invalidate these pages after
we restore data from pages. It could avoid crash in above scenario.

Changes from V1
 o remove redundant code in ra_sum_pages() suggested by Jaegeuk Kim.

Call Trace:
 [<f1031630>] ? ftrace_raw_event_f2fs_write_checkpoint+0x80/0x80 [f2fs]
 [<f10377bb>] f2fs_submit_page_mbio+0x1cb/0x200 [f2fs]
 [<f103c5da>] restore_node_summary+0x13a/0x280 [f2fs]
 [<f103e22d>] build_curseg+0x2bd/0x620 [f2fs]
 [<f104043b>] build_segment_manager+0x1cb/0x920 [f2fs]
 [<f1032c85>] f2fs_fill_super+0x535/0x8e0 [f2fs]
 [<c115b66a>] mount_bdev+0x16a/0x1a0
 [<f102f63f>] f2fs_mount+0x1f/0x30 [f2fs]
 [<c115c096>] mount_fs+0x36/0x170
 [<c1173635>] vfs_kern_mount+0x55/0xe0
 [<c1175388>] do_mount+0x1e8/0x900
 [<c1175d72>] SyS_mount+0x82/0xc0
 [<c16059cc>] sysenter_do_call+0x12/0x22

Suggested-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2014-06-04 13:34:30 +09:00
..
acl.c f2fs: pass flags field to setxattr functions 2014-05-07 10:21:56 +09:00
acl.h f2fs: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
checkpoint.c f2fs: add a tracepoint for f2fs_write_{meta,node,data}_pages 2014-05-07 10:21:59 +09:00
data.c f2fs: add a tracepoint for f2fs_read_data_page 2014-05-07 10:21:59 +09:00
debug.c f2fs: remove unnecessary threshold 2014-03-20 22:10:09 +09:00
dir.c f2fs: avoid overflow when large directory feathure is enabled 2014-06-04 13:34:30 +09:00
f2fs.h f2fs: fix to truncate inline data in inode page when setattr 2014-05-07 10:21:58 +09:00
file.c f2fs: fix to truncate inline data in inode page when setattr 2014-05-07 10:21:58 +09:00
gc.c f2fs: remove the unused ctor argument of f2fs_kmem_cache_create() 2014-03-10 18:45:14 +09:00
gc.h f2fs: add a sysfs entry to control max_victim_search 2014-01-08 13:45:08 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inline.c f2fs: avoid grab_cache_page_write_begin for data pages 2014-05-07 10:21:58 +09:00
inode.c f2fs: deactivate inode page if the inode is evicted 2014-05-07 10:21:58 +09:00
Kconfig f2fs: introduce CONFIG_F2FS_CHECK_FS for BUG_ON control 2013-10-29 15:43:01 +09:00
Makefile f2fs: key functions to handle inline data 2013-12-26 20:40:09 +09:00
namei.c f2fs: use inode_init_owner() to simplify codes 2014-05-08 18:23:21 +09:00
node.c f2fs: avoid crash when trace f2fs_submit_page_mbio event in ra_sum_pages 2014-06-04 13:34:30 +09:00
node.h f2fs: fix checkpatch warning 2014-05-07 10:21:59 +09:00
recovery.c f2fs: set errno when f2fs_iget failed in recover_dentry 2014-05-07 10:21:57 +09:00
segment.c f2fs: avoid to use slab memory in f2fs_issue_flush for efficiency 2014-05-08 18:23:21 +09:00
segment.h f2fs: change reclaim rate in percentage 2014-03-20 22:10:10 +09:00
super.c f2fs: introduce help function {create,destroy}_flush_cmd_control 2014-05-07 10:21:57 +09:00
xattr.c f2fs: fix recursive lock by f2fs_setxattr 2014-06-02 22:13:16 +09:00
xattr.h f2fs: pass flags field to setxattr functions 2014-05-07 10:21:56 +09:00