Re: [PATCH] printk: Fix spinlock deadlock in printk reenty

2016-11-30 Thread Andrew Morton
On Wed, 30 Nov 2016 15:15:19 +0800 wrote: > From: Jinling Ke > > when Oops in printk, printk will call zap_locks() to reinitialize > spinlock to prevent deadlock. In arm, arm64, x86 or other > architecture smp cpu, race condition will occur in printk spinlock > logbuf_lock and then it will resu

Re: [PATCH] printk: Fix spinlock deadlock in printk reenty

2016-11-30 Thread Peter Zijlstra
On Wed, Nov 30, 2016 at 11:56:53AM +0100, Petr Mladek wrote: > On Wed 2016-11-30 15:15:19, linyongt...@huawei.com wrote: > > In arm, arm64, x86 or other architecture, spinlock variable x86 no longer uses ticket locks. > > The solution is that In function zap_locks(), replace > > raw_spin_lock_ini

Re: [PATCH] printk: Fix spinlock deadlock in printk reenty

2016-11-30 Thread Petr Mladek
On Wed 2016-11-30 15:15:19, linyongt...@huawei.com wrote: > From: Jinling Ke > > when Oops in printk, printk will call zap_locks() to reinitialize > spinlock to prevent deadlock. In arm, arm64, x86 or other > architecture smp cpu, race condition will occur in printk spinlock > logbuf_lock and the

[PATCH] printk: Fix spinlock deadlock in printk reenty

2016-11-29 Thread linyongting
From: Jinling Ke when Oops in printk, printk will call zap_locks() to reinitialize spinlock to prevent deadlock. In arm, arm64, x86 or other architecture smp cpu, race condition will occur in printk spinlock logbuf_lock and then it will result other cpu that is waiting printk spinlock in deadlock