Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm: vmpressure: Fix a race that would erroneously clear accumulated data
Since the code that determines whether data should be cleared and the code that actually clears the data are in separate spin-locked critical sections, new data could be generated on another CPU after it is determined that the existing data should be cleared, but before the current CPU clears the existing data. This would cause the new data reported by the other CPU to be lost. Fix the race by clearing accumulated data within the same spin-locked critical section that determines whether or not data should be cleared. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: Khusika Dhamar Gusti <mail@khusika.com>
- Loading branch information