linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] kdb: Fix locking in vkdb_printf()
@ 2016-10-21 12:50 Petr Mladek
  2016-10-21 12:50 ` [PATCH 1/2] kdb: Properly synchronize vkdb_printf() calls with other CPUs Petr Mladek
  2016-10-21 12:50 ` [PATCH 2/2] kdb: Call vkdb_printf() from vprintk_default() only when wanted Petr Mladek
  0 siblings, 2 replies; 11+ messages in thread
From: Petr Mladek @ 2016-10-21 12:50 UTC (permalink / raw)
  To: Jason Wessel
  Cc: Daniel Thompson, Peter Zijlstra, Andrew Morton,
	Sergey Senozhatsky, linux-kernel, Petr Mladek

I have been asked whether it is safe to call vkdb_printf() from
vprintk_nmi() in NMI context. It seems that it is not safe.
Well, is not a big deal.

But I have noticed suspicious patterns when looking at the
vkdb_printf() locking code and prepared two patches that
should avoid some possible races.

Please, note that I am not familiar with the kdb implementation.
I hope that I have got the requested behavior right. I did
some basic testing and did not found any problem. But I am sure
that I did not test all usecases.

Petr Mladek (2):
  kdb: Properly synchronize vkdb_printf() calls with other CPUs
  kdb: Call vkdb_printf() from vprintk_default() only when wanted

 include/linux/kdb.h            |  1 +
 kernel/debug/kdb/kdb_io.c      | 41 +++++++++++++++++------------------------
 kernel/debug/kdb/kdb_private.h |  1 -
 kernel/printk/printk.c         |  4 +++-
 4 files changed, 21 insertions(+), 26 deletions(-)

-- 
1.8.5.6

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-11-23 16:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-21 12:50 [PATCH 0/2] kdb: Fix locking in vkdb_printf() Petr Mladek
2016-10-21 12:50 ` [PATCH 1/2] kdb: Properly synchronize vkdb_printf() calls with other CPUs Petr Mladek
2016-11-07 10:07   ` Daniel Thompson
2016-11-22 10:34     ` Petr Mladek
2016-10-21 12:50 ` [PATCH 2/2] kdb: Call vkdb_printf() from vprintk_default() only when wanted Petr Mladek
2016-10-23 13:23   ` Sergey Senozhatsky
2016-11-22 12:14     ` Petr Mladek
2016-11-07 10:24   ` Daniel Thompson
2016-11-22 12:45     ` Petr Mladek
2016-11-22 14:32       ` Daniel Thompson
2016-11-23 16:29         ` Petr Mladek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).