aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorYu Kuai <[email protected]>2023-03-10 15:38:51 +0800
committerSong Liu <[email protected]>2023-04-13 22:20:24 -0700
commit6efddf1e32e2a264694766ca485a4f5e04ee82a7 (patch)
treeb8968b451ff3df4ba17a17eceb6453f0f04e0961 /lib/test_fortify/write_overflow-strncpy-src.c
parentc31fea2f8e2a72c817f318016bbc327095175a9f (diff)
md: fix soft lockup in status_resync
status_resync() will calculate 'curr_resync - recovery_active' to show user a progress bar like following: [============>........] resync = 61.4% 'curr_resync' and 'recovery_active' is updated in md_do_sync(), and status_resync() can read them concurrently, hence it's possible that 'curr_resync - recovery_active' can overflow to a huge number. In this case status_resync() will be stuck in the loop to print a large amount of '=', which will end up soft lockup. Fix the problem by setting 'resync' to MD_RESYNC_ACTIVE in this case, this way resync in progress will be reported to user. Signed-off-by: Yu Kuai <[email protected]> Signed-off-by: Song Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions