OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
* [Devel] [PATCH hci-8.2 0/3] dm/push_backup: fix two old bugs and remove the unused messages
@ 2026-11-25 11:29 Vasileios Almpanis
  2026-11-25 11:29 ` [Devel] [PATCH hci-8.2 1/3] dm/push_backup: reject a cluster size of 0 Vasileios Almpanis
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Vasileios Almpanis @ 2026-11-25 11:29 UTC (permalink / raw)
  To: Konstantin Khorenko; +Cc: Den Lunev, devel

This series fixes the two older bugs that sashiko found in the
push_backup driver during the review of VSTOR-153891, and removes the
push_backup_read and push_backup_write messages that the current
ploop-backup no longer sends.

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. 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.

The third patch removes the push_backup_read and push_backup_write
messages. The current ploop-backup uses the event fd since commit
d723a1617e61 ("dm/push_backup: add event file descriptor interface"),
and push_backup_read is the message that sleeps with md->io_barrier
SRCU read locked. push_backup_write() itself stays, because the fd
write path uses it.

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,
the removed messages, 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
https://virtuozzo.atlassian.net/browse/VSTOR-155816

Signed-off-by: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
---
Vasileios Almpanis (3):
      dm/push_backup: reject a cluster size of 0
      dm/push_backup: free the bitmaps of an expired session on restart
      dm/push_backup: remove the push_backup_read and push_backup_write messages

 drivers/md/dm-push-backup.c         | 37 +++++++++----------------------------
 include/uapi/linux/dm-push-backup.h |  5 ++---
 2 files changed, 11 insertions(+), 31 deletions(-)
---
base-commit: aef96420256e57bf1291859a844800a462f2790e
change-id: 20261125-push-backup-fixes-a4dc3cef9cbe

-- 
Best regards, Vasileios Almpanis
Software Developer, Virtuozzo.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-25 11:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 11:29 [Devel] [PATCH hci-8.2 0/3] dm/push_backup: fix two old bugs and remove the unused messages Vasileios Almpanis
2026-11-25 11:29 ` [Devel] [PATCH hci-8.2 1/3] dm/push_backup: reject a cluster size of 0 Vasileios Almpanis
2026-11-25 11:29 ` [Devel] [PATCH hci-8.2 2/3] dm/push_backup: free the bitmaps of an expired session on restart Vasileios Almpanis
2026-11-25 11:47   ` Konstantin Khorenko
2026-11-25 11:29 ` [Devel] [PATCH hci-8.2 3/3] dm/push_backup: remove the push_backup_read and push_backup_write messages Vasileios Almpanis
2026-11-25 11:47   ` Konstantin Khorenko
2026-11-25 11:47 ` [Devel] [PATCH hci-8.2 0/3] dm/push_backup: fix two old bugs and remove the unused messages Konstantin Khorenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox