All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Andrey Zhadchenko <andrey.zhadchenko@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 0/2] dm/push_backup: fix two old bugs
Date: Wed, 25 Nov 2026 13:16:56 +0100	[thread overview]
Message-ID: <bdfcd176-0758-4afe-a2af-3254e9aefe3e@virtuozzo.com> (raw)
In-Reply-To: <20261125-push-backup-fixes-v2-0-195a2bcd82f7@virtuozzo.com>

Reviewed-by: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>

On 11/25/26 13:12, Vasileios Almpanis wrote:
> This series fixes the two older bugs that sashiko found in the
> push_backup driver during the review of VSTOR-153891.
> 
> The first patch rejects a cluster size of 0 in the constructor. Before
> it, such a table line divided by zero and oopsed the kernel. Only root
> can load a table, but a malformed table line must not crash the node.
> 
> The second patch fixes a leak of the backup bitmaps. When a session
> expires, the target keeps its bitmaps so that the status can report it
> as expired. A new push_backup_start then allocated new bitmaps and
> overwrote the pointers to the old ones, which were never freed. With
> fail_on_process_exit this is easy to hit, because the session expires
> as soon as the backup process exits. setup_pb() now swaps the new
> bitmaps in and frees the old ones.
> 
> I tested the series on 8.2 with a debug kernel with KASAN, lockdep and
> kmemleak enabled. The tests covered a table with a cluster size of 0,
> a backup through the event fd, the fail_on_process_exit tests from
> VSTOR-153891 and repeated restarts of an expired session. KASAN,
> lockdep and kmemleak reported nothing, and the bitmaps no longer leak.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-155791
> https://virtuozzo.atlassian.net/browse/VSTOR-155790
> 
> Signed-off-by: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
> ---
> Changes in v2:
> - Drop the patch that removed the push_backup_read and push_backup_write
>    messages. The ploop test still sends them and an older ploop-backup
>    has nothing that keeps it off this kernel, so it will come separately.
> - 2/2: say that the old bitmaps are never freed, drop the 32 GiB
>    example and say that a failed start keeps only the bitmaps.
> - Link to v1: http://lore.virtuozzo.com/20261125-push-backup-fixes-v1-0-8d5cc55c30a1@virtuozzo.com
> 
> ---
> Vasileios Almpanis (2):
>        dm/push_backup: reject a cluster size of 0
>        dm/push_backup: free the bitmaps of an expired session on restart
> 
>   drivers/md/dm-push-backup.c | 11 +++++++++--
>   1 file changed, 9 insertions(+), 2 deletions(-)
> ---
> base-commit: aef96420256e57bf1291859a844800a462f2790e
> change-id: 20261125-push-backup-fixes-a4dc3cef9cbe
> 

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

  parent reply	other threads:[~2026-11-25 12:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 12:12 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
2026-11-25 12:16 ` Andrey Zhadchenko [this message]
2026-11-30 15:06 ` [Devel] [PATCH hci-8.2 v2 0/2] dm/push_backup: fix two old bugs 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=bdfcd176-0758-4afe-a2af-3254e9aefe3e@virtuozzo.com \
    --to=andrey.zhadchenko@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 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.