Merge branch 'perf-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf: Fix NULL deref in inheritance code perf: Pass appropriate frame pointer to dump_trace()
This commit is contained in:
commit
952363c90c
@ -2347,7 +2347,7 @@ perf_callchain_kernel(struct pt_regs *regs, struct perf_callchain_entry *entry)
|
||||
callchain_store(entry, PERF_CONTEXT_KERNEL);
|
||||
callchain_store(entry, regs->ip);
|
||||
|
||||
dump_trace(NULL, regs, NULL, 0, &backtrace_ops, entry);
|
||||
dump_trace(NULL, regs, NULL, regs->bp, &backtrace_ops, entry);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -5148,7 +5148,7 @@ int perf_event_init_task(struct task_struct *child)
|
||||
GFP_KERNEL);
|
||||
if (!child_ctx) {
|
||||
ret = -ENOMEM;
|
||||
goto exit;
|
||||
break;
|
||||
}
|
||||
|
||||
__perf_event_init_context(child_ctx, child);
|
||||
@ -5164,7 +5164,7 @@ int perf_event_init_task(struct task_struct *child)
|
||||
}
|
||||
}
|
||||
|
||||
if (inherited_all) {
|
||||
if (child_ctx && inherited_all) {
|
||||
/*
|
||||
* Mark the child context as a clone of the parent
|
||||
* context, or of whatever the parent is a clone of.
|
||||
@ -5184,7 +5184,6 @@ int perf_event_init_task(struct task_struct *child)
|
||||
get_ctx(child_ctx->parent_ctx);
|
||||
}
|
||||
|
||||
exit:
|
||||
mutex_unlock(&parent_ctx->mutex);
|
||||
|
||||
perf_unpin_context(parent_ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user