Change-Id: Ic432caf4e0c0969c126668781007574770a6c3ae
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
/* Detects when IPs are really loaded into phy mem and installs probes. */
static int ret_handler_mf(struct kretprobe_instance *ri, struct pt_regs *regs)
{
- struct task_struct *task;
+ struct task_struct *task = current;
unsigned long page_addr;
- task = current->group_leader;
if (is_kthread(task))
return 0;
continue;
proc = get_proc_by_pfg(pfg, task);
- if (proc == NULL) {
+ if (proc == NULL && task->tgid == task->pid) {
proc = new_proc_by_pfg(pfg, task);
pfg_first = pfg;
}
}
INIT_LIST_HEAD(&proc->list);
- proc->tgid = task ? task->tgid : 0;
- proc->task = task;
+ proc->tgid = task->tgid;
+ proc->task = task->group_leader;
proc->sm = create_sm_us(task);
proc->first_install = 0;
INIT_LIST_HEAD(&proc->file_list);