From: Thomas Gleixner <tglx@linutronix.de>
To: Waiman Long <llong@redhat.com>,
John Ogness <jogness@linutronix.de>,
Waiman Long <llong@redhat.com>, Pavel Machek <pavel@ucw.cz>
Cc: kernel list <linux-kernel@vger.kernel.org>,
mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
x86@kernel.org, hpa@zytor.com, peterz@infradead.org,
will@kernel.org, miriam.rachel.korenblit@intel.com,
linux-wireless@vger.kernel.org, Petr Mladek <pmladek@suse.com>
Subject: Re: locking problems in iwlwifi? was Re: 6.16-rcX: crashing way too often on thinkpad X220
Date: Fri, 25 Jul 2025 15:44:29 +0200 [thread overview]
Message-ID: <87y0scpepu.ffs@tglx> (raw)
In-Reply-To: <6a27ffeb-a79b-4623-9ad3-392973a1fcce@redhat.com>
On Thu, Jul 24 2025 at 20:16, Waiman Long wrote:
> On 7/24/25 3:45 PM, John Ogness wrote:
> I am sorry for confusing conole_owner_lock with the console_owner
> lockdep map. Yes, this lockdep splat should be a false positive. You do
> need to put the mutex_acquire before printk_safe_exit_irqrestore() to
> avoid this splat.
No. The printk code is absolutely correct as it is.
Did you actually read my analysis?
The lockdep splat is triggered by the raw_spin_unlock_irq() in
__flush_work() as it makes console_owner unsafe.
Again:
printk()
local_irq_save()
acquire(console_owner);
con->write()
vt_console_print()
hide_cursor()
vc->vc_sw->con_cursor()
fbcon_cursor()
fbcon_del_cursor_work()
cancel_delayed_work_sync()
__flush_work()
raw_spin_unlock_irq() <- FAIL
The initial report from
cancel_delayed_work_sync() _CANNOT_ be invoked from atomic contexts,
unless the work is marked as BH work. And for BH work it cannot be
called from hard interrupt context for obvious reasons.
Marking that cursor work BH is not helping either, as printk() can be
invoked from everywhere.
There is no way to legitimately invoke cancel_delayed_work_sync() from
the legacy console write() callback ever.
No?
Thanks,
tglx
next prev parent reply other threads:[~2025-07-25 13:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <aH/L1PCwtwe8Y1+a@duo.ucw.cz>
[not found] ` <aID6XPLXuGo+ViTm@duo.ucw.cz>
2025-07-23 15:42 ` locking problems in iwlwifi? was Re: 6.16-rcX: crashing way too often on thinkpad X220 Pavel Machek
2025-07-23 17:13 ` Johannes Berg
2025-07-23 20:37 ` Pavel Machek
2025-07-24 8:50 ` John Ogness
2025-07-23 21:42 ` Pavel Machek
2025-09-15 9:32 ` Pavel Machek
2025-07-23 17:31 ` Thomas Gleixner
2025-07-23 17:32 ` Thomas Gleixner
2025-07-24 17:15 ` Pavel Machek
2025-07-24 17:51 ` Waiman Long
2025-07-24 17:55 ` Waiman Long
2025-07-24 21:24 ` Thomas Gleixner
2025-07-25 15:23 ` Thomas Gleixner
2025-07-25 19:05 ` Pavel Machek
2025-07-24 19:07 ` Pavel Machek
2025-07-24 19:22 ` Waiman Long
2025-07-24 22:21 ` Thomas Gleixner
2025-07-25 1:56 ` Waiman Long
2025-07-24 19:45 ` John Ogness
2025-07-25 0:16 ` Waiman Long
2025-07-25 13:44 ` Thomas Gleixner [this message]
2025-07-25 19:38 ` Waiman Long
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=87y0scpepu.ffs@tglx \
--to=tglx@linutronix.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=llong@redhat.com \
--cc=mingo@redhat.com \
--cc=miriam.rachel.korenblit@intel.com \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=will@kernel.org \
--cc=x86@kernel.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