OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>,
	Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: Den Lunev <den@virtuozzo.com>, devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 v2 2/2] dm/push_backup: free the bitmaps of an expired session on restart
Date: Tue, 1 Dec 2026 00:15:04 +0000	[thread overview]
Message-ID: <010701a22ef47ec6-2de3e9e9-e88a-4b5f-8623-dfa724f23460-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261125-push-backup-fixes-v2-2-195a2bcd82f7@virtuozzo.com>

> When a backup session expires, cleanup_backup() clears pb->alive but
> keeps pb->map and pb->pending_map, so that the target status can still
> report the session as expired. push_backup_start() refuses to start
> only while pb->alive is set, so a start after an expiry goes on to
> setup_pb(), which overwrites both pointers with new bitmaps. The old
> bitmaps are never freed, because push_backup_stop() and pb_destroy()
> free only the current pointers.
> 
> Each bitmap takes one bit per cluster. With fail_on_process_exit the
> session expires as soon as the sender exits, so this is easy to hit in
> a loop:
> 
>   for i in $(seq 1000); do
>     dmsetup message <pb_dev> 0 push_backup_start 60 0 fail_on_process_exit
>   done
> 
> Swap the new bitmaps in under pb->lock and free the old ones in
> setup_pb(). Nothing dereferences the bitmaps of an expired session
> without holding pb->lock, so they can be freed once the lock is
> dropped. If setting up the new session fails, the expired session
> keeps its bitmaps.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-155790
> 
> Feature: dm-backup: push backup target driver
> Fixes: 162123bc62c7 ("dm: Add push backup driver")
> Signed-off-by: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261125-push-backup-fixes-v2-0-195a2bcd82f7@virtuozzo.com?part=2


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-12-01  0:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 12:12 [Devel] [PATCH hci-8.2 v2 0/2] dm/push_backup: fix two old bugs Vasileios Almpanis
2026-11-25 12:12 ` [Devel] [PATCH hci-8.2 v2 1/2] dm/push_backup: reject a cluster size of 0 Vasileios Almpanis
2026-12-01  0:14   ` no-reply
2026-11-25 12:12 ` [Devel] [PATCH hci-8.2 v2 2/2] dm/push_backup: free the bitmaps of an expired session on restart Vasileios Almpanis
2026-12-01  0:15   ` no-reply [this message]
2026-11-25 12:16 ` [Devel] [PATCH hci-8.2 v2 0/2] dm/push_backup: fix two old bugs Andrey Zhadchenko
2026-11-30 15:06 ` Konstantin Khorenko
2026-11-30 15:06 ` 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=010701a22ef47ec6-2de3e9e9-e88a-4b5f-8623-dfa724f23460-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=den@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    --cc=vasileios.almpanis@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