>>> - if (!task_mm(task, TRUE))
>>> + if (!(addr = task_mm(task, TRUE)))
>>> + return;
>>> +
>>> + if (!readmem(addr + OFFSET(mm_struct_mm_count), KVADDR, &mm_count,
>>> + sizeof(int), "mm_struct mm_count", RETURN_ON_ERROR))
>>> + return;
tt->mm_struct is filled in task_mm(), I think we can use this:
mm_count = INT(tt->mm_struct + OFFSET(mm_struct_mm_count));
The following code in get_task_mem_usage() also use this.
Thanks,
Kazu