mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Linux 3.16-rc7
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJT1VYNAAoJEHm+PkMAQRiGQJwIAKSYp1Uqz5O/e5r0V1TlZKT4 1B4Njopl57PwSrJQWcGEuH2yHyM896vfPO4L6BJIOfyWzh8kwpQqclDt6uhXoF/v OsO1zb/7/j+n/pDZsePqP9AyIgErsHEBgUbhecDqzjN++ITPcZjQ6TIMPglZaumN jFAdAZuAaEwqAk8jqN2wlm689Fh9MuUEarHXbXLCqu5RgLrWhFGhp/cTWY62aqnZ XfEeQ9KtpRZmlR/IYjerbb1eRH7ZdJsZ88WngLX9dj/JdNxHWBkWQBXGAusXk5Fk y6LsIV3TjyBdrRKJ1Ifyg/2EIXHNBs8HxTFGXpjtp2HPuMLDxZOWOWikb9URtNg= =Fjf4 -----END PGP SIGNATURE----- Merge tag 'v3.16-rc7' into perf/core, to merge in the latest fixes before applying new changes Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
commit
5030c69755
1000 changed files with 9707 additions and 5791 deletions
|
|
@ -2320,7 +2320,7 @@ static void perf_event_context_sched_out(struct task_struct *task, int ctxn,
|
|||
next_parent = rcu_dereference(next_ctx->parent_ctx);
|
||||
|
||||
/* If neither context have a parent context; they cannot be clones. */
|
||||
if (!parent && !next_parent)
|
||||
if (!parent || !next_parent)
|
||||
goto unlock;
|
||||
|
||||
if (next_parent == ctx || next_ctx == parent || next_parent == parent) {
|
||||
|
|
@ -7464,7 +7464,19 @@ __perf_event_exit_task(struct perf_event *child_event,
|
|||
struct perf_event_context *child_ctx,
|
||||
struct task_struct *child)
|
||||
{
|
||||
perf_remove_from_context(child_event, true);
|
||||
/*
|
||||
* Do not destroy the 'original' grouping; because of the context
|
||||
* switch optimization the original events could've ended up in a
|
||||
* random child task.
|
||||
*
|
||||
* If we were to destroy the original group, all group related
|
||||
* operations would cease to function properly after this random
|
||||
* child dies.
|
||||
*
|
||||
* Do destroy all inherited groups, we don't care about those
|
||||
* and being thorough is better.
|
||||
*/
|
||||
perf_remove_from_context(child_event, !!child_event->parent);
|
||||
|
||||
/*
|
||||
* It can happen that the parent exits first, and has events
|
||||
|
|
@ -7480,7 +7492,7 @@ __perf_event_exit_task(struct perf_event *child_event,
|
|||
static void perf_event_exit_task_context(struct task_struct *child, int ctxn)
|
||||
{
|
||||
struct perf_event *child_event, *next;
|
||||
struct perf_event_context *child_ctx;
|
||||
struct perf_event_context *child_ctx, *parent_ctx;
|
||||
unsigned long flags;
|
||||
|
||||
if (likely(!child->perf_event_ctxp[ctxn])) {
|
||||
|
|
@ -7505,6 +7517,15 @@ static void perf_event_exit_task_context(struct task_struct *child, int ctxn)
|
|||
raw_spin_lock(&child_ctx->lock);
|
||||
task_ctx_sched_out(child_ctx);
|
||||
child->perf_event_ctxp[ctxn] = NULL;
|
||||
|
||||
/*
|
||||
* In order to avoid freeing: child_ctx->parent_ctx->task
|
||||
* under perf_event_context::lock, grab another reference.
|
||||
*/
|
||||
parent_ctx = child_ctx->parent_ctx;
|
||||
if (parent_ctx)
|
||||
get_ctx(parent_ctx);
|
||||
|
||||
/*
|
||||
* If this context is a clone; unclone it so it can't get
|
||||
* swapped to another process while we're removing all
|
||||
|
|
@ -7514,6 +7535,13 @@ static void perf_event_exit_task_context(struct task_struct *child, int ctxn)
|
|||
update_context_time(child_ctx);
|
||||
raw_spin_unlock_irqrestore(&child_ctx->lock, flags);
|
||||
|
||||
/*
|
||||
* Now that we no longer hold perf_event_context::lock, drop
|
||||
* our extra child_ctx->parent_ctx reference.
|
||||
*/
|
||||
if (parent_ctx)
|
||||
put_ctx(parent_ctx);
|
||||
|
||||
/*
|
||||
* Report the task dead after unscheduling the events so that we
|
||||
* won't get any samples after PERF_RECORD_EXIT. We can however still
|
||||
|
|
|
|||
|
|
@ -846,7 +846,7 @@ static void __uprobe_unregister(struct uprobe *uprobe, struct uprobe_consumer *u
|
|||
{
|
||||
int err;
|
||||
|
||||
if (!consumer_del(uprobe, uc)) /* WARN? */
|
||||
if (WARN_ON(!consumer_del(uprobe, uc)))
|
||||
return;
|
||||
|
||||
err = register_for_each_vma(uprobe, NULL);
|
||||
|
|
@ -927,7 +927,7 @@ int uprobe_apply(struct inode *inode, loff_t offset,
|
|||
int ret = -ENOENT;
|
||||
|
||||
uprobe = find_uprobe(inode, offset);
|
||||
if (!uprobe)
|
||||
if (WARN_ON(!uprobe))
|
||||
return ret;
|
||||
|
||||
down_write(&uprobe->register_rwsem);
|
||||
|
|
@ -952,7 +952,7 @@ void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consume
|
|||
struct uprobe *uprobe;
|
||||
|
||||
uprobe = find_uprobe(inode, offset);
|
||||
if (!uprobe)
|
||||
if (WARN_ON(!uprobe))
|
||||
return;
|
||||
|
||||
down_write(&uprobe->register_rwsem);
|
||||
|
|
|
|||
Loading…
Reference in a new issue