mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tj@kernel.org" <tj@kernel.org>
To: "Weiß, Simone" <Simone.Weiss@elektrobit.com>
Cc: "jiangshanlai@gmail.com" <jiangshanlai@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: BUG: MAX_LOCKDEP_ENTRIES too low! triggered by ext4&workqueue
Date: Wed, 13 Mar 2024 10:09:57 -1000	[thread overview]
Message-ID: <ZfIIFeXk_bZfI9MG@slm.duckdns.org> (raw)
In-Reply-To: <31142ccf9bd1893b773f53ff51025a27a8179367.camel@elektrobit.com>

On Wed, Mar 13, 2024 at 12:15:24PM +0000, Weiß, Simone wrote:
> Dear all,
> 
> For some experimentation, I have been running fuzzing campaigns and I
> noticed  BUG: MAX_LOCKDEP_ENTRIES too low! most likely triggered by ext4
> operations.
> 
> As I found a C reproducer in my setup, it could be bisected being introduced
> with the following:
> commit 967b494e2fd143a9c1a3201422aceadb5fa9fbfc
> Author: Tejun Heo <tj@kernel.org>
> Date:   Mon Aug 7 15:57:23 2023 -1000
> 
>     workqueue: Use a kthread_worker to release pool_workqueues
>     
>     pool_workqueue release path is currently bounced to system_wq; however, this
>     is a bit tricky because this bouncing occurs while holding a pool lock and
>     thus has risk of causing a A-A deadlock. This is currently addressed by the
>     fact that only unbound workqueues use this bouncing path and system_wq is a
>     per-cpu workqueue.
>  
> ...
> 
> It was reproducible on v6.6.16 and v6.16.21.
> The C reproducer is automatically generated by syzkaller and included below.
> 
> If you need any further information, just let me know.

Does the following happen to fix the issue for you?

Thanks.

diff --git a/kernel/locking/lockdep_internals.h b/kernel/locking/lockdep_internals.h
index bbe9000260d0..bc027ea2372b 100644
--- a/kernel/locking/lockdep_internals.h
+++ b/kernel/locking/lockdep_internals.h
@@ -94,7 +94,7 @@ static const unsigned long LOCKF_USED_IN_IRQ_READ =
  * table (if it's not there yet), and we check it for lock order
  * conflicts and deadlocks.
  */
-#define MAX_LOCKDEP_ENTRIES    16384UL
+#define MAX_LOCKDEP_ENTRIES    32768UL
 #define MAX_LOCKDEP_CHAINS_BITS        15
 #define MAX_STACK_TRACE_ENTRIES        262144UL
 #define STACK_TRACE_HASH_SIZE  8192

-- 
tejun

  reply	other threads:[~2024-03-13 20:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 12:15 Weiß, Simone
2024-03-13 20:09 ` tj [this message]
2024-03-14  7:22   ` Weiß, Simone

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=ZfIIFeXk_bZfI9MG@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=Simone.Weiss@elektrobit.com \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.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®