diff options
author | Kinsey Ho <[email protected]> | 2024-09-05 00:30:52 +0000 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-09-09 16:39:16 -0700 |
commit | 3d150e31a1f62f0b39bdd8b968f563f8f3915d7a (patch) | |
tree | ea316a3a723c1b8edf17eb250c805620a56a6142 /lib/crypto/mpi/mpiutil.c | |
parent | 4a2698b0133b5c477515ccbedff169fec722d0e7 (diff) |
mm: increment gen # before restarting traversal
The generation number in struct mem_cgroup_reclaim_iter should be
incremented on every round-trip. Currently, it is possible for a
concurrent reclaimer to jump in at the end of the hierarchy, causing a
traversal restart (resetting the iteration position) without incrementing
the generation number.
By resetting the position without incrementing the generation, it's
possible for another ongoing mem_cgroup_iter() thread to walk the tree
twice.
Move the traversal restart such that the generation number is
incremented before the restart.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kinsey Ho <[email protected]>
Reviewed-by: T.J. Mercier <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Michal Koutný <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Roman Gushchin <[email protected]>
Cc: Shakeel Butt <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Yosry Ahmed <[email protected]>
Cc: Zefan Li <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions