mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <llong@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Waiman Long <llong@redhat.com>,
	John Ogness <jogness@linutronix.de>, 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:38:38 -0400	[thread overview]
Message-ID: <c13616d1-b11e-460a-8eda-5aa72c9123d8@redhat.com> (raw)
In-Reply-To: <87y0scpepu.ffs@tglx>


On 7/25/25 9:44 AM, Thomas Gleixner wrote:
> 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?
I have read your analysis and I believe in your conclusion.
>
> 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?

I am not disputing this.

Thanks,
Longman


      reply	other threads:[~2025-07-25 19:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-22 17:35 Pavel Machek
2025-07-23 15:06 ` Pavel Machek
2025-07-23 15:11   ` Dave Hansen
2025-07-23 20:35     ` Pavel Machek
2025-07-23 15:42   ` locking problems in iwlwifi? was " 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  0:33                 ` Hillf Danton
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
2025-07-25 19:38                   ` Waiman Long [this message]

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=c13616d1-b11e-460a-8eda-5aa72c9123d8@redhat.com \
    --to=llong@redhat.com \
    --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=mingo@redhat.com \
    --cc=miriam.rachel.korenblit@intel.com \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=tglx@linutronix.de \
    --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

all inboxes | Powered by JetHome®