From: Helge Deller <deller@gmx.de>
To: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Petr Mladek <pmladek@suse.com>
Cc: linux-parisc@vger.kernel.org
Subject: [PATCH] watchdog: Fix lockdep warning
Date: Fri, 11 Aug 2023 19:11:46 +0200 [thread overview]
Message-ID: <ZNZr0mPsIuqKzb5u@p100> (raw)
Fully initialize detector_work work struct to avoid this kernel warning
when lockdep is enabled:
=====================================
WARNING: bad unlock balance detected!
6.5.0-rc5+ #687 Not tainted
-------------------------------------
swapper/0/1 is trying to release lock (detector_work) at:
[<000000004037e554>] __flush_work+0x60/0x658
but there are no more locks to release!
other info that might help us debug this:
no locks held by swapper/0/1.
stack backtrace:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.5.0-rc5+ #687
Hardware name: 9000/785/C3700
Backtrace:
[<0000000041455d5c>] print_unlock_imbalance_bug.part.0+0x20c/0x230
[<000000004040d5e8>] lock_release+0x2e8/0x3f8
[<000000004037e5cc>] __flush_work+0xd8/0x658
[<000000004037eb7c>] flush_work+0x30/0x60
[<000000004011f140>] lockup_detector_check+0x54/0x128
[<0000000040306430>] do_one_initcall+0x9c/0x408
[<0000000040102d44>] kernel_init_freeable+0x688/0x7f0
[<000000004146df68>] kernel_init+0x64/0x3a8
[<0000000040302020>] ret_from_kernel_thread+0x20/0x28
Signed-off-by: Helge Deller <deller@gmx.de>
---
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index be38276a365f..eab0dfcfa3f9 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -1022,5 +1022,6 @@ void __init lockup_detector_init(void)
else
allow_lockup_detector_init_retry = true;
+ INIT_WORK(&detector_work, lockup_detector_delay_init);
lockup_detector_setup();
}
next reply other threads:[~2023-08-11 17:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 17:11 Helge Deller [this message]
2023-08-15 11:54 ` [PATCH] watchdog: Fix lockdep warning Petr Mladek
2023-08-15 12:44 ` Helge Deller
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=ZNZr0mPsIuqKzb5u@p100 \
--to=deller@gmx.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=pmladek@suse.com \
/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