mm: kmemleak: reduce transient false positives by confirming leaks
Status from this message: [merged mm-stable] selftests-mm-test-kmemleaks-n-consecutive-scan-leak-confirmation.patch removed from -mm tree
Get series with b4
b4 am [email protected] change-id 20260713-catalin_pto-dbacf66be3faVersions newest first
Changes from v1 from the cover letter
Now that commit 79c37ae3733e9 is upstream, the selftest includes an additional priming phase scan as requested by Catalin.
Patches in v1 All 4 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mm: kmemleak: confirm suspected leaks with a second scanmm/ | +54 | 2 replies | Applied |
| 2/4 | mm: kmemleak: report leaks only after N consecutive unreferenced scansDocumentation/ mm/ | +20 | 0 replies | Applied |
| 3/4 | mm: kmemleak: factor leak confirmation into a helpermm/ | +21 | 1 reply | Applied |
| 4/4 | selftests: mm: test kmemleak's N-consecutive-scan leak confirmationtools/ tools/ | +133 | 1 reply | Applied |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Catalin Marinas |
|---|---|
| 1/4 | |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] mm: kmemleak: reduce transient false positives by confirming leaks
This series combines two kmemleak enhancements that were originally submitted separately but both required rebasing after commit 79c37ae3733e9 ("mm/kmemleak:
fix checksum computation for per-cpu objects").
The first feature introduces a second scan to confirm suspected leaks:
https://lore.kernel.org/all/[email protected]/
The second feature adds a module parameter controlling the minimum number of consecutive unreferenced scans before a leak is reported, as discussed in:
https://lore.kernel.org/all/[email protected]/
Changes from v1:
Now that commit 79c37ae3733e9 is upstream, the selftest includes an additional priming phase scan as requested by Catalin.
Additionally, I've factored out the leak-detection conditional into a helper function to be more digestible for the reader's eye.
This 4-patch series resolves all outstanding kmemleak issues I've been tracking.
---
Breno Leitao (3):
mm: kmemleak: report leaks only after N consecutive unreferenced scans
mm: kmemleak: factor leak confirmation into a helper
selftests: mm: test kmemleak's N-consecutive-scan leak confirmation
Catalin Marinas (1):
mm: kmemleak: confirm suspected leaks with a second scan
Documentation/dev-tools/kmemleak.rst | 8 ++ mm/kmemleak.c | 90 +++++++++++++- tools/testing/selftests/mm/Makefile | 1 + .../testing/selftests/mm/ksft_kmemleak_confirm.sh | 132 +++++++++++++++++++++ 4 files changed, 225 insertions(+), 6 deletions(-)
---
base-commit: bee763d5f341b99cf472afeb508d4988f62a6ca1
change-id: 20260713-catalin_pto-dbacf66be3fa
Best regards,
Signature · 1 line
Breno Leitao <[email protected]>