From: "Denis V. Lunev" <den@openvz.org>
To: khorenko@virtuozzo.com, andrey.zhadchenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 1/2] dm-ploop: stop enospc_timer in ploop_destroy()
Date: Mon, 9 Nov 2026 20:06:56 +0100 [thread overview]
Message-ID: <20261109190657.1851487-2-den@openvz.org> (raw)
In-Reply-To: <20261109190657.1851487-1-den@openvz.org>
From: Denis V. Lunev <den@openvz.org>
The destructor never stops enospc_timer. ploop_presuspend() deletes it
with timer_delete_sync_try(), which does not wait for a callback that
runs on another CPU, and ploop_try_delay_enospc() tests wants_suspend
without deferred_lock, so a write that fails with ENOSPC around the
presuspend can arm the timer again. The callback dereferences the
struct ploop that ploop_dtr() frees.
Shut the timer down at the start of ploop_destroy(), which waits for a
running callback and keeps the timer from being armed again. The timer
is set up before kt_worker is created, so it is valid wherever
ploop_destroy() finds kt_worker set.
https://virtuozzo.atlassian.net/browse/VSTOR-154182
Fixes: 6ddad5a4d226 ("dm-ploop: Add ploop target driver")
Feature: dm-ploop: ploop target driver
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
drivers/md/dm-ploop-target.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/dm-ploop-target.c b/drivers/md/dm-ploop-target.c
index d8279c79ef56..5ab25cbd5c32 100644
--- a/drivers/md/dm-ploop-target.c
+++ b/drivers/md/dm-ploop-target.c
@@ -164,6 +164,7 @@ static void ploop_destroy(struct ploop *ploop)
int i;
if (ploop->kt_worker) {
+ timer_shutdown_sync(&ploop->enospc_timer);
ploop->force_md_writeback = 1;
wake_up_process(ploop->kt_worker->task);
/* try to send all pending - if we have partial io and enospc end bellow */
--
2.53.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-09 19:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 19:06 [Devel] [PATCH hci-8.1 0/2] dm-ploop: fix writes held on ENOSPC never being retried Denis V. Lunev
2026-11-09 19:06 ` Denis V. Lunev [this message]
2026-11-09 19:17 ` [Devel] [PATCH hci-8.1 1/2] dm-ploop: stop enospc_timer in ploop_destroy() no-reply
2026-11-09 19:06 ` [Devel] [PATCH hci-8.1 2/2] dm-ploop: fix the ENOSPC retry timer not waking the dispatcher Denis V. Lunev
2026-11-09 19:18 ` no-reply
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=20261109190657.1851487-2-den@openvz.org \
--to=den@openvz.org \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=devel@openvz.org \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox