mmgrab — Pin a struct mm_struct.
void mmgrab ( | struct mm_struct * mm) ; |
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.