summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2026-07-13 04:48:06 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-08-20 18:24:40 -0700
commite3ea655e56d215104d625adf172ddc8784986123 (patch)
treed014393bfa3cd27bdaf0a6b548a781ab9e02d7d1 /tools
parent33eb372099bcc66b86b36881ff55121ee4264beb (diff)
downloadlinux-next-e3ea655e56d215104d625adf172ddc8784986123.tar.gz
linux-next-e3ea655e56d215104d625adf172ddc8784986123.zip
mm: kmemleak: factor leak confirmation into a helper
The reporting loop in kmemleak_scan() decided whether to tag an object as a reported leak with a four-term compound condition whose last operand also had a side effect (++object->unref_scans). Mixing the candidate tests with the counter update made the check hard to read. Move the state transition into confirm_leak(): it returns true when a still-unreferenced suspect crosses min_unref_scans consecutive scans and is newly flagged OBJECT_REPORTED, leaving only the reporting bookkeeping in the caller. No functional change. Link: https://lore.kernel.org/20260713-catalin_pto-v1-3-5b93b1131089@debian.org Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Cc: David Hildenbrand <david@kernel.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions