Skip to content
Snippets Groups Projects
Commit b4912b9b authored by Ankur Bansal's avatar Ankur Bansal
Browse files

lrdp_V2 : Fix for broken lsof.py


in case of task list corruption, lsof is breaking
or stuck in look because of cycle is found in taks list.

use the task list iterator API which is handling all
task list corruption case.

Change-Id: I8f9f89e47307c603ce13a56edecd7c576c80ca61
Signed-off-by: default avatarAnkur Bansal <ankban@codeaurora.org>
parent 0434d4ea
No related branches found
No related tags found
No related merge requests found
......@@ -33,17 +33,9 @@ TASK_NAME_LENGTH = 16
def do_dump_lsof_info(self, ramdump, lsof_info):
task_list_head_offset = ramdump.field_offset('struct task_struct', 'tasks')
init_task_address = self.ramdump.address_of('init_task')
init_tasklist_head = init_task_address + task_list_head_offset
task_list_head = ramdump.read_structure_field(
init_tasklist_head, 'struct list_head', 'next')
while task_list_head != init_tasklist_head:
task = task_list_head - task_list_head_offset
parse_task(self, ramdump, task, lsof_info)
for task_struct in ramdump.for_each_process():
parse_task(self, ramdump, task_struct, lsof_info)
lsof_info.write("\n*********************************")
task_list_head = ramdump.read_structure_field(
task_list_head, 'struct list_head', 'next')
def parse_task(self, ramdump, task, lsof_info):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment