SourceForge has been redesigned. Learn more.

Commit [50e1f8]  Maximize  Restore  History

f2fs: avoid to access NULL pointer in issue_flush_thread


Denis 2014-05-10 11:28:59 UTC reported:
"F2FS-fs (mmcblk0p28): mounting..
Unable to handle kernel NULL pointer dereference at virtual address 00000018
[<c0a2f678>] (_raw_spin_lock+0x3c/0x70) from [<c03a0330>] (issue_flush_thread+0x50/0x17c)
[<c03a0330>] (issue_flush_thread+0x50/0x17c) from [<c01b4064>] (kthread+0x98/0xa4)
[<c01b4064>] (kthread+0x98/0xa4) from [<c0108060>] (kernel_thread_exit+0x0/0x8)"

This patch assign cmd_control_info in sm_info before issue_flush_thread is being
created, so this make sure that issue flush thread will have no chance to access
invalid info in fcc.

Signed-off-by: Chao Yu <>
Reviewed-by: Gu Zheng <>
Signed-off-by: Jaegeuk Kim <>

Chao Yu Chao Yu 2014-07-07

Jaegeuk Kim Jaegeuk Kim 2014-07-09

changed fs/f2fs/segment.c
fs/f2fs/segment.c Diff Switch to side-by-side view