From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 v11 6/9] dm-ploop: fix use-after-free on the last inflight_md decrement
Date: Fri, 20 Nov 2026 12:03:26 +0100 [thread overview]
Message-ID: <179517260667.332110.6772784114042633093.b4-review@b4> (raw)
In-Reply-To: <20261120081702.3721349-7-alexander.ivanov@virtuozzo.com>
I won't apply this version, please send v12, items 2 and 3 of the
cover letter reply.
On Fri, 20 Nov 2026 09:16:59 +0100, Alexander Ivanov wrote:
> + /* BAT writes may still be completing from aio context */
> + wait_event(ploop->inflight_md_wq,
> + !atomic_read(&ploop->inflight_md));
> + /* Wait for ploop_dec_inflight_md() to drop the lock */
> + spin_lock_irq(&ploop->inflight_md_wq.lock);
> + spin_unlock_irq(&ploop->inflight_md_wq.lock);
Item 2: on hci-8.2 ploop_destroy() already waits for file_io_ref,
which covers every completion that drops the last piwb reference.
> Nothing on the suspend or destroy path waits for inflight_md, and the
> one waiter that exists, ploop_suspend_submitting_pios(), checks the
Item 3: with 8/9 postsuspend and preresume do wait for it,
uninterruptibly, so wake_up_interruptible() is the bug left on
hci-8.2.
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-20 11:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 8:16 [Devel] [PATCH hci-8.2 v11 0/9] dm-ploop: give back unused tail of top delta on suspend Alexander Ivanov
2026-11-20 8:16 ` [Devel] [PATCH hci-8.2 v11 1/9] dm-ploop: reject a delta header whose BAT does not cover the target Alexander Ivanov
2026-11-20 8:16 ` [Devel] [PATCH hci-8.2 v11 2/9] dm-ploop: reject empty deltas Alexander Ivanov
2026-11-20 8:16 ` [Devel] [PATCH hci-8.2 v11 3/9] dm-ploop: set delta is_raw before applying its mappings Alexander Ivanov
2026-11-20 8:16 ` [Devel] [PATCH hci-8.2 v11 4/9] dm-ploop: factor out ploop_read_delta() from ploop_add_delta() Alexander Ivanov
2026-11-20 8:16 ` [Devel] [PATCH hci-8.2 v11 5/9] dm-ploop: take bat_lock around md page lookup in ploop_llseek_hole() Alexander Ivanov
2026-11-20 8:16 ` [Devel] [PATCH hci-8.2 v11 6/9] dm-ploop: fix use-after-free on the last inflight_md decrement Alexander Ivanov
2026-11-20 11:03 ` Konstantin Khorenko [this message]
2026-11-20 8:17 ` [Devel] [PATCH hci-8.2 v11 7/9] dm-ploop: fix flip_upper_deltas racing with resume Alexander Ivanov
2026-11-20 8:17 ` [Devel] [PATCH hci-8.2 v11 8/9] dm-ploop: reload metadata on resume Alexander Ivanov
2026-11-20 8:17 ` [Devel] [PATCH hci-8.2 v11 9/9] dm-ploop: truncate unused tail of top delta on suspend Alexander Ivanov
2026-11-20 11:03 ` [Devel] [PATCH hci-8.2 v11 0/9] dm-ploop: give back " Konstantin Khorenko
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=179517260667.332110.6772784114042633093.b4-review@b4 \
--to=khorenko@virtuozzo.com \
--cc=alexander.ivanov@virtuozzo.com \
--cc=devel@openvz.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