Skip to content

Commit 8d12e3c

Browse files
author
CKI KWF Bot
committed
Merge: fs/proc: fix softlockup in __read_vmcore (part 2)
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/3463 JIRA: https://issues.redhat.com/browse/RHEL-79112 CVE: CVE-2025-21694 Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git commit cbc5dde Author: Rik van Riel <[email protected]> Date: Fri Jan 10 10:28:21 2025 -0500 fs/proc: fix softlockup in __read_vmcore (part 2) Since commit 5cbcb62 ("fs/proc: fix softlockup in __read_vmcore") the number of softlockups in __read_vmcore at kdump time have gone down, but they still happen sometimes. In a memory constrained environment like the kdump image, a softlockup is not just a harmless message, but it can interfere with things like RCU freeing memory, causing the crashdump to get stuck. The second loop in __read_vmcore has a lot more opportunities for natural sleep points, like scheduling out while waiting for a data write to happen, but apparently that is not always enough. Add a cond_resched() to the second loop in __read_vmcore to (hopefully) get rid of the softlockups. Link: https://lkml.kernel.org/r/20250110102821.2a37581b@fangorn Fixes: 5cbcb62 ("fs/proc: fix softlockup in __read_vmcore") Signed-off-by: Rik van Riel <[email protected]> Reported-by: Breno Leitao <[email protected]> Cc: Baoquan He <[email protected]> Cc: Dave Young <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Baoquan He <[email protected]> Closes RHEL-79112 Approved-by: Lichen Liu <[email protected]> Approved-by: Pingfan Liu <[email protected]> Approved-by: CKI KWF Bot <[email protected]> Merged-by: CKI KWF Bot <[email protected]>
2 parents 25b97f0 + 640f5e0 commit 8d12e3c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/proc/vmcore.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,8 @@ static ssize_t __read_vmcore(struct iov_iter *iter, loff_t *fpos)
405405
if (!iov_iter_count(iter))
406406
return acc;
407407
}
408+
409+
cond_resched();
408410
}
409411

410412
return acc;

0 commit comments

Comments
 (0)