On Tue, Sep 02, 2014 at 03:27:20PM -0700, Cong Wang wrote:
> From: Cong Wang <cw...@twopensource.com>
> 
> We saw a kernel soft lockup in perf_remove_from_context(),
> it looks like the `perf` process, when exiting, could not go
> out of the retry loop. Meanwhile, the target process was forking
> a child. So either the target process should execute the smp
> function call to deactive the event (if it was running) or it should
> do a context switch which deactives the event.
> 
> It seems we optimize out a context switch in perf_event_context_sched_out(),
> and what's more important, we still test an obsolete task pointer when
> retrying, so no one actually would deactive that event in this situation.
> Fix it directly by reloading the task pointer in perf_remove_from_context().
> This should cure the above soft lockup.
> 
> Cc: sta...@vger.kernel.org
> Cc: Peter Zijlstra <a.p.zijls...@chello.nl>
> Cc: Paul Mackerras <pau...@samba.org>
> Cc: Ingo Molnar <mi...@redhat.com>
> Cc: Arnaldo Carvalho de Melo <a...@kernel.org>
> Signed-off-by: Cong Wang <cw...@twopensource.com>
> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com>

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to