From: Konstantin Khorenko <khorenko@virtuozzo.com>
Subject: [Devel] [PATCH RHEL10 COMMIT] dm-tracking: initialize dmt->lock with spin_lock_init()
Date: Wed, 5 Aug 2026 21:50:34 +0200 [thread overview]
Message-ID: <202608051950.675JoYkK535991@f0.sw.ru> (raw)
In-Reply-To: <20260706110002.1024515-14-khorenko@virtuozzo.com>
The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.39.1.16.2.vz10
------>
commit 402b7d534b6d4c30c54a2283274c8b4c858c9d3f
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
Date: Mon Jul 6 12:59:51 2026 +0200
dm-tracking: initialize dmt->lock with spin_lock_init()
struct dm_tracking is allocated with kzalloc() and its embedded
spinlock dmt->lock is taken in dmt_status()/tracking_clear()/
tracking_get_next()/dmt_cmd(), but dmt_ctr() never runs
spin_lock_init() on it (only ctl_mutex is initialized). A zero-filled
spinlock has no static lockdep key, so on the first spin_lock_irq() a
lockdep kernel prints:
INFO: trying to register non-static key.
... turning off the locking correctness validator.
_raw_spin_lock_irq <- dmt_status <- dm_ima_measure_on_table_load
<- table_load <- ctl_ioctl
and disables lockdep for the rest of the boot. Initialize the spinlock
in the constructor next to mutex_init(&dmt->ctl_mutex).
Fixes: a036ef57b6b1d ("dm: Add dm-tracking target")
Feature: dm-tracking: dirty blocks tracking target driver (for migration)
https://virtuozzo.atlassian.net/browse/VSTOR-137234
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
drivers/md/dm-tracking.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/dm-tracking.c b/drivers/md/dm-tracking.c
index ff0ba1cc55107..9b387a92f9a98 100644
--- a/drivers/md/dm-tracking.c
+++ b/drivers/md/dm-tracking.c
@@ -153,6 +153,7 @@ static int dmt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
goto err;
mutex_init(&dmt->ctl_mutex);
+ spin_lock_init(&dmt->lock);
ti->private = dmt;
dmt->ti = ti;
parent reply other threads:[~2026-08-05 19:50 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20260706110002.1024515-14-khorenko@virtuozzo.com>]
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=202608051950.675JoYkK535991@f0.sw.ru \
--to=khorenko@virtuozzo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.