jbd2: check need_resched() when skipping busy checkpoint buffers
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
9c31bb2684f8035beca0275349d19d679b679ffb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
jbd2: check need_resched() when skipping busy checkpoint buffers
journal_shrink_one_cp_list() skips busy checkpoint buffers when called with JBD2_SHRINK_BUSY_SKIP. The continue statement on this path also skips the need_resched() check at the end of the loop body.
Consequently, when a checkpoint list contains mostly busy buffers, the shrinker can walk the entire list while holding journal->j_list_lock, even when a reschedule has been requested. Large checkpoint lists under memory pressure can therefore cause long lock hold times and leave other CPUs spinning on j_list_lock, resulting in soft lockups or RCU stalls.
Route the busy-buffer path through the need_resched() check so that the shrinker can release j_list_lock and reschedule promptly, restoring parity with the clean-buffer path, which already checks need_resched(). This does not change which checkpoint buffers are eligible for removal.
From the CVE record · Linux
The jbd2 checkpoint shrinker can skip a rescheduling check while walking busy buffers under memory pressure. Large checkpoint lists can then cause long lock holds, leaving other CPUs spinning and resulting in soft lockups or RCU stalls. The input does not specify an attacker path, authentication requirement, or user interaction.
Teams running the Linux kernel should check their installations; affected versions are not specified.