summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorCaleb Kan <ckan@cloudflare.com>2026-10-22 09:33:30 +0100
committerAndrew Morton <akpm@linux-foundation.org>2026-10-24 00:46:51 -0700
commit8f56ea8e0706d92774603260779c7032f03ef3ac (patch)
treedb118249f68e319c2cd078b477aae757d55ac86f /tools/lib/python/kdoc/python_version.py
parentb584c45b6066fd9799c44ffb9badcb5db351c8a6 (diff)
stackdepot: stop preallocating after the final pool
depot_init_pool() decides whether another pool is needed before it increments pools_num. When it registers the last allowed pool, pools_num is still one below stack_max_pools, so the existing comparison clears new_pool. With new_pool cleared, stack_depot_save_flags() can allocate another order-2 pool after a lookup miss. depot_keep_new_pool() retains its pointer in the global new_pool, so the allocation is not lost. However, pools_num has already reached stack_max_pools, and depot_init_pool() rejects every attempt to register the pool. It remains allocated and unusable until reboot. The non-NULL pointer prevents later saves from allocating more spare pools. Account for the pool being registered in the limit check so registering the final pool installs STACK_DEPOT_POISON and prevents the extra allocation. Link: https://lore.kernel.org/20261022083330.3159793-1-matt@readmodwrite.com Fixes: 31639fd6cebd ("stackdepot: use variable size records for non-evictable entries") Signed-off-by: Caleb Kan <ckan@cloudflare.com> Signed-off-by: Matt Fleming <mfleming@cloudflare.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Marco Elver <elver@google.com> Cc: Andrey Konovalov <andreyknvl@gmail.com> Cc: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> Cc: Caleb Kan <calebkan1106@gmail.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Vlastimil Babka <vbabka@kernel.org> Cc: <stable@vger.kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions