In the Linux kernel, the following vulnerability has been resolved:
md: fix soft lockup in status_resync
statusresync() will calculate 'currresync - recovery_active' to show user a progress bar like following:
[============>........] resync = 61.4%
'currresync' and 'recoveryactive' is updated in mddosync(), and statusresync() can read them concurrently, hence it's possible that 'currresync - recoveryactive' can overflow to a huge number. In this case statusresync() 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 MDRESYNCACTIVE in this case, this way resync in progress will be reported to user.