public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org, Rik van Riel <riel@surriel.com>,
	Omar Sandoval <osandov@meta.com>
Subject: [PATCH printk v1 0/2] Fix ABBA deadlock for legacy printing with cpu_sync
Date: Mon,  9 Dec 2024 12:23:44 +0106	[thread overview]
Message-ID: <20241209111746.192559-1-john.ogness@linutronix.de> (raw)

Hi,

An RFC patch [0] was posted to fix an ABBA deadlock related to
nmi_backtrace() and dump_stack_lvl(). However, the underlying
problem was trying to perform legacy printing while holding the
printk_cpu_sync.

This series causes legacy printing to defer when holding the
printk_cpu_sync.

The first patch in the series is not necessary for the deadlock
fix, but was a redundancy I noticed while working on the series.

John Ogness

[0] https://lore.kernel.org/lkml/20240715232052.73eb7fb1@imladris.surriel.com

John Ogness (2):
  printk: Remove redundant deferred check in vprintk()
  printk: Defer legacy printing when holding printk_cpu_sync

 kernel/printk/internal.h    |  6 ++++++
 kernel/printk/printk.c      |  5 +++++
 kernel/printk/printk_safe.c | 16 ++++++----------
 3 files changed, 17 insertions(+), 10 deletions(-)


base-commit: 4022ef25504db2fb79a2acac0afe9bac934f8dd6
-- 
2.39.5


             reply	other threads:[~2024-12-09 11:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 11:17 John Ogness [this message]
2024-12-09 11:17 ` [PATCH printk v1 1/2] printk: Remove redundant deferred check in vprintk() John Ogness
2024-12-11 14:24   ` Petr Mladek
2024-12-09 11:17 ` [PATCH printk v1 2/2] printk: Defer legacy printing when holding printk_cpu_sync John Ogness
2024-12-11 15:03   ` Petr Mladek
2024-12-11 16:48     ` John Ogness
2024-12-16 14:17       ` Petr Mladek
2025-01-10 11:22         ` John Ogness
2025-01-10 15:30           ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241209111746.192559-1-john.ogness@linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=osandov@meta.com \
    --cc=pmladek@suse.com \
    --cc=riel@surriel.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox