Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

kmemleak gets lots of false positives when using UKMS #63

@lwfinger

Description

@lwfinger

Last week I was helping a user of UKSM that was having failures of swiotbl entries. To see if it would help, he turned on kmemleak. Immediately, we got a lot of entries with the following back-trace:

[<00000000df775e69>] get_next_rmap_item+0x129b/0x1600
[<00000000c3ada4e5>] scan_vma_one_page+0x40/0xf0
[<000000009a1b1eb3>] uksm_do_scan+0x164/0x2040
[<000000009ad9d2b0>] uksm_scan_thread+0x18e/0x1d0
[<00000000b85a4745>] kthread+0x11c/0x160
[<0000000075d8016e>] ret_from_fork+0x35/0x40

These point to the alllocation of rmap_item in scan_vma_one_page(). When I first analyzed the code, I thought I saw where this memory was being freed, but I cannot repeat the analysis. I do not see any increase in memory usage with UKMS installed, thus I believe that these are false positive results from kmemleak. If that is true, kmemleak can be silenced with the attached patch:

patch_uksm.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions