UPSTREAM: f2fs: fix to do sanity check in update_sit_entry
If GET_SEGNO return NULL_SEGNO for some unecpected case, update_sit_entry will access invalid memory address, cause system crash. It is better to do sanity check about GET_SEGNO just like update_segment_mtime & locate_dirty_segment. Also remove some redundant judgment code. Bug: 365944734 Signed-off-by:Zhiguo Niu <zhiguo.niu@unisoc.com> Reviewed-by:
Chao Yu <chao@kernel.org> Signed-off-by:
Jaegeuk Kim <jaegeuk@kernel.org> (cherry picked from commit fb7f3bdc) Change-Id: Ie980a9b2512b00da4eeeff91bf40494a68aa6084 (cherry picked from commit 7c61d7e3)
Loading
Please sign in to comment