us_manager: fix "comm" filter 97/94197/2
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 27 Oct 2016 11:05:04 +0000 (14:05 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 27 Oct 2016 11:57:11 +0000 (14:57 +0300)
 Check task->comm instead task->group_leader->comm, because
page_fault might will be call from child task which comm field
is defferent from main task.

Change-Id: Idaea3116c90c683cfcdd1344ad069dc0d49c64b7
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
us_manager/pf/proc_filters.c

index 241a216..5806048 100644 (file)
@@ -86,7 +86,7 @@ static struct task_struct *call_by_comm(struct proc_filter *self,
        char *comm = (char *)self->data;
        size_t len = strnlen(comm, TASK_COMM_LEN);
 
-       if (!strncmp(comm, task->comm, len))
+       if (!strncmp(comm, task->group_leader->comm, len))
                return task;
 
        parent = task->parent;