On 10/15/26 12:48 AM, Muhammad Mahdi Amirpour wrote:
> Check that a partial MREMAP_DONTUNMAP operation on mlocked memory
> preserves locked-memory accounting and that unmapping both mappings
> returns VmLck to its original value.
>
> This tests for a locked_vm accounting leak after a partial remap.
>
> Signed-off-by: Muhammad Mahdi Amirpour <[email protected]>
> ---
There's already a patch in mm-unstable that adds a test for mlock
accounting [1]. It covers the partial mremap with MREMAP_DONTUNMAP case
as well.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=35524c870053cb28bb056fb17e715ebebec17229