• Suren Baghdasaryan's avatar
    selftests/mm: call uffd_test_ctx_clear at the end of the test · 1c8d39fa
    Suren Baghdasaryan authored
    uffd_test_ctx_clear() is being called from uffd_test_ctx_init() to unmap
    areas used in the previous test run.  This approach is problematic because
    while unmapping areas uffd_test_ctx_clear() uses page_size and nr_pages
    which might differ from one test run to another.  Fix this by calling
    uffd_test_ctx_clear() after each test is done.
    
    Link: https://lkml.kernel.org/r/20231206103702.3873743-4-surenb@google.comSigned-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
    Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
    Reviewed-by: default avatarAxel Rasmussen <axelrasmussen@google.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Brian Geffon <bgeffon@google.com>
    Cc: Christian Brauner <brauner@kernel.org>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Jann Horn <jannh@google.com>
    Cc: Kalesh Singh <kaleshsingh@google.com>
    Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
    Cc: Lokesh Gidra <lokeshgidra@google.com>
    Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Mike Rapoport (IBM) <rppt@kernel.org>
    Cc: Nicolas Geoffray <ngeoffray@google.com>
    Cc: Ryan Roberts <ryan.roberts@arm.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Cc: ZhangPeng <zhangpeng362@huawei.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    1c8d39fa
uffd-stress.c 12.5 KB