From: "Weiß, Simone" <Simone.Weiss@elektrobit.com>
To: "tj@kernel.org" <tj@kernel.org>
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: Thu, 14 Mar 2024 07:22:54 +0000 [thread overview]
Message-ID: <4ecbd3c2788bb4761abb97913d6116c6a69806b4.camel@elektrobit.com> (raw)
In-Reply-To: <ZfIIFeXk_bZfI9MG@slm.duckdns.org>
On Wed, 2024-03-13 at 10:09 -1000, tj@kernel.org wrote:
> 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
Hello,
I applied the diff on v6.8 and could still reproduce the issue.
As I understand the code, this would only been taken in if
CONFIG_LOCKDEP_SMALL is set. Lockdep related config options on
my side are:
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_LOCKDEP=y
CONFIG_LOCKDEP_BITS=15
CONFIG_LOCKDEP_CHAINS_BITS=16
CONFIG_LOCKDEP_STACK_TRACE_BITS=19
CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14
CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12
# CONFIG_DEBUG_LOCKDEP is not set
Thanks,
Simone
prev parent reply other threads:[~2024-03-14 7:23 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
2024-03-14 7:22 ` Weiß, Simone [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=4ecbd3c2788bb4761abb97913d6116c6a69806b4.camel@elektrobit.com \
--to=simone.weiss@elektrobit.com \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@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®