summaryrefslogtreecommitdiff
path: root/samples/vfio-mdev/mdpy.c
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2024-01-24 17:49:15 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2024-02-06 05:58:41 +0300
commit21ec68234826b1b54ab980a8df6e33c74cfbee58 (patch)
treec31c6a934a70fe3865268db396b803a0f5db9c47 /samples/vfio-mdev/mdpy.c
parent8e9c1a349b5e227f687fa6f047e1a785b07371ea (diff)
downloadlinux-21ec68234826b1b54ab980a8df6e33c74cfbee58.tar.xz
f2fs: fix to avoid potential panic during recovery
During recovery, if FAULT_BLOCK is on, it is possible that f2fs_reserve_new_block() will return -ENOSPC during recovery, then it may trigger panic. Also, if fault injection rate is 1 and only FAULT_BLOCK fault type is on, it may encounter deadloop in loop of block reservation. Let's change as below to fix these issues: - remove bug_on() to avoid panic. - limit the loop count of block reservation to avoid potential deadloop. Fixes: 956fa1ddc132 ("f2fs: fix to check return value of f2fs_reserve_new_block()") Reported-by: Zhiguo Niu <zhiguo.niu@unisoc.com> Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'samples/vfio-mdev/mdpy.c')
0 files changed, 0 insertions, 0 deletions