Date: Mon, 18 Feb 2013 10:54:44 +0100 From: tglx@linutronix.de To: buyit@live.cn CC: mulyadi.santosa@gmail.com; kernelnewbies@kernelnewbies.org; a.p.zijlstra@chello.nl; rabin@rab.in; mingo@kernel.org Subject: RE: spinlock deadlock
On Sun, 17 Feb 2013, buyitian wrote:
Could you please use a mail client, which creates readable mail?
this patch is to prevent deadlock between rq->lock and logbuf_lock. i can understand this thanks to Rabin. 2. in patch 07354eb1a74d1e1ece29f8bafe0b46e8c77a95ef, Thomas did changes as below, which reverted the change from peter, i don't know why: in function console_trylock_for_printk():
- spin_unlock(&logbuf_lock); if (wake) up(&console_sem); + raw_spin_unlock(&logbuf_lock);
and this change exists in the latest kernel source code. it seems that deadlock bewteen rq->lock and logbuf_lock comes back, who can explain this, thanks. BTW: if i place printk inside schedule(), i may get rq->lock before calling printk.
That looks like a merge slipup. The patch which converts the lock is not supposed to do any other changes. But the patch was based on an older kernel version, which did not have Peters changes yet. So the fixup of the not longer applying patch failed somehow. i will provide patch, thanks for your reply.
Thanks,
tglx