Scroll to navigation

MMGRAB(9) Driver Basics MMGRAB(9)

NAME

mmgrab - Pin a struct mm_struct.

SYNOPSIS

void mmgrab(struct mm_struct * mm);

ARGUMENTS

mm

The struct mm_struct to pin.

DESCRIPTION

Make sure that mm will not get freed even after the owning task exits. This doesn't guarantee that the associated address space will still exist later on and mmget_not_zero has to be used before accessing it.

This is a preferred way to to pin mm for a longer/unbounded amount of time.

Use mmdrop to release the reference acquired by mmgrab.

See also <Documentation/vm/active_mm.txt> for an in-depth explanation of mm_struct.mm_count vs mm_struct.mm_users.

COPYRIGHT

June 2024 Kernel Hackers Manual 3.10