Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1533239
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] printk: Fix spinlock deadlock in printk reenty |
| Date | 2016-11-30 12:40 +0100 |
| Message-ID | <sJboZ-5v2-15@gated-at.bofh.it> (permalink) |
| References | <sJ7lo-31Q-15@gated-at.bofh.it> <sJaMi-52Z-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Nov 30, 2016 at 11:56:53AM +0100, Petr Mladek wrote: > On Wed 2016-11-30 15:15:19, linyongting@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_init(&logbuf_lock) with raw_spin_unlock(&logbuf_lock), That's broken too. Imagine the CPU that actually holds the lock then _also_ doing an unlock. At that point the tail is ahead of the head and you're also up some creek without no paddle. Note that I ran into all these scenarios many years ago.. > Another solution would be to make printk() to ignore locks > when Oops is in progress. It was somewhere suggested by Peter > Zijlstra. Well, it might cause some problems as well when > there are more CPUs still running and printing. Ignoring is the only option. There is no way to fudge the lock state and live to tell about it.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] printk: Fix spinlock deadlock in printk reenty <linyongting@huawei.com> - 2016-11-30 08:20 +0100
Re: [PATCH] printk: Fix spinlock deadlock in printk reenty Petr Mladek <pmladek@suse.com> - 2016-11-30 12:00 +0100
Re: [PATCH] printk: Fix spinlock deadlock in printk reenty Peter Zijlstra <peterz@infradead.org> - 2016-11-30 12:40 +0100
Re: [PATCH] printk: Fix spinlock deadlock in printk reenty Andrew Morton <akpm@linux-foundation.org> - 2016-11-30 22:00 +0100
csiph-web