summaryrefslogtreecommitdiff
path: root/kernel/panic.c
diff options
context:
space:
mode:
authorFriedrich Vock <friedrich.vock@gmx.de>2025-01-27 16:27:52 +0100
committerMaarten Lankhorst <dev@lankhorst.se>2025-02-19 09:50:37 +0100
commit8821f36333e27c8355d4a730649923f938e1e4b9 (patch)
tree6a10cabce67885683958d9608718c2425b689371 /kernel/panic.c
parentb3fefbb30a1691533cb905006b69b2a474660744 (diff)
cgroup/dmem: Don't open-code css_for_each_descendant_pre
The current implementation has a bug: If the current css doesn't contain any pool that is a descendant of the "pool" (i.e. when found_descendant == false), then "pool" will point to some unrelated pool. If the current css has a child, we'll overwrite parent_pool with this unrelated pool on the next iteration. Since we can just check whether a pool refers to the same region to determine whether or not it's related, all the additional pool tracking is unnecessary, so just switch to using css_for_each_descendant_pre for traversal. Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") Signed-off-by: Friedrich Vock <friedrich.vock@gmx.de> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250127152754.21325-1-friedrich.vock@gmx.de Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Diffstat (limited to 'kernel/panic.c')
0 files changed, 0 insertions, 0 deletions