Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1681983
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [GIT PULL] printk for 4.13 |
| Date | 2017-07-06 03:00 +0200 |
| Message-ID | <u03jc-5nS-7@gated-at.bofh.it> (permalink) |
| References | <tZawq-2Ha-17@gated-at.bofh.it> <tZXdM-1mP-13@gated-at.bofh.it> <u039v-5kK-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On (07/06/17 09:44), Sergey Senozhatsky wrote: > > No, this is entirely buggered. > > > > You can't just do > > > > raw_spin_is_locked(&logbuf_lock) > > > > to test whether you can get the logbuf_lock and then call vprintk_default(). > > > > It's not just about deadlock avoidance, the code will call things like > > down_trylock() on the console semaphore, and that operation is > > fundamentally not NMI-safe. The semaphore count is literally protected > > by a irq-safe (BUT NOT NMI-SAFE!) semaphore spinlock. > > > > So now you can instead deadlock just on the internal console semaphore > > spinlock (ie somebody is doing "console_lock()", NMI comes in, *BOOM*. > > you are right. but > just in case if my previous email was too hard to follow, may be the link below will explain it in a less broken language. (I'm sorry, I'm on medication now and didn't have enough coffee yet.) https://marc.info/?l=linux-kernel&m=149265908228203&w=2 -ss
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL] printk for 4.13 Petr Mladek <pmladek@suse.com> - 2017-07-03 16:30 +0200
Re: [GIT PULL] printk for 4.13 Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-05 20:30 +0200
Re: [GIT PULL] printk for 4.13 Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-07-06 02:50 +0200
Re: [GIT PULL] printk for 4.13 Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-07-06 03:00 +0200
Re: [GIT PULL] printk for 4.13 Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-06 03:20 +0200
Re: [GIT PULL] printk for 4.13 Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-07-06 03:20 +0200
csiph-web