Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 952363c9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'perf-fixes-for-linus-2' of...

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()
parents 2d959e95 05cbaa28
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}

/*
+2 −3
Original line number Diff line number Diff line
@@ -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);