Re: [PATCH] MIPS: perf: fix deadlock

2017-04-10 Thread Ralf Baechle
Thanks, applied. Ralf

Re: [PATCH] MIPS: perf: fix deadlock

2017-04-10 Thread Ralf Baechle
Thanks, applied. Ralf

Re: [PATCH] MIPS: perf: fix deadlock

2017-04-06 Thread Peter Zijlstra
On Wed, Apr 05, 2017 at 03:14:08PM +0200, Rabin Vincent wrote: That lock is disgusting... but yes patch looks about right. I'll leave it to the MIPS people though. > --- > arch/mips/kernel/perf_event_mipsxx.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git

Re: [PATCH] MIPS: perf: fix deadlock

2017-04-06 Thread Peter Zijlstra
On Wed, Apr 05, 2017 at 03:14:08PM +0200, Rabin Vincent wrote: That lock is disgusting... but yes patch looks about right. I'll leave it to the MIPS people though. > --- > arch/mips/kernel/perf_event_mipsxx.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git

[PATCH] MIPS: perf: fix deadlock

2017-04-05 Thread Rabin Vincent
From: Rabin Vincent mipsxx_pmu_handle_shared_irq() calls irq_work_run() while holding the pmuint_rwlock for read. irq_work_run() can, via perf_pending_event(), call try_to_wake_up() which can try to take rq->lock. However, perf can also call perf_pmu_enable() (and thus take

[PATCH] MIPS: perf: fix deadlock

2017-04-05 Thread Rabin Vincent
From: Rabin Vincent mipsxx_pmu_handle_shared_irq() calls irq_work_run() while holding the pmuint_rwlock for read. irq_work_run() can, via perf_pending_event(), call try_to_wake_up() which can try to take rq->lock. However, perf can also call perf_pmu_enable() (and thus take the pmuint_rwlock