Lock the context before getting the mmap region to update