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] dm/push_backup: stop the backup when the process that started it exits
Date: Wed, 18 Nov 2026 12:27:29 +0000 [thread overview]
Message-ID: <010701a1eea05d22-c19a7264-e525-495f-b863-399f0c1358aa-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261118-vstor-153891-v1-1-f31daea66355@virtuozzo.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] dm-push-backup: bad fail_on_process_exit argument returns
success
--
commit 3578882a0ee4244aebcea5a102bc0fcc5dc0eae8
Author: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
dm/push_backup: stop the backup when the process that started it exits
This adds an optional fail_on_process_exit argument to push_backup_start. With it, the target adds a wait queue entry to the sender's pid->wait_pidfd. When the whole process exits, the session expires the same way as when the deadline timer fires.
> diff --git a/drivers/md/dm-push-backup.c b/drivers/md/dm-push-backup.c
> --- a/drivers/md/dm-push-backup.c
> +++ b/drivers/md/dm-push-backup.c
[ ... ]
> @@ -724,14 +775,18 @@ static int pb_message(struct dm_target *ti, unsigned int argc, char **argv,
> goto out;
>
> if (!strcmp(argv[0], "push_backup_start")) {
> - if (argc < 2 || argc > 3)
> + if (argc < 2 || argc > 4)
> goto unlock;
> if (kstrtou64(argv[1], 10, &val) < 0)
> goto unlock;
> val2 = 0;
> - if (argc == 3 && kstrtou64(argv[2], 10, &val2) < 0)
> + if (argc >= 3 && kstrtou64(argv[2], 10, &val2) < 0)
> + goto unlock;
> + if (argc == 4 && strcmp(argv[3], "fail_on_process_exit"))
> goto unlock;
[Severity: Low]
Does this new check return success for a misspelled fourth argument? By this point ret holds 0 from the successful down_write_killable(), so the goto unlock returns 0 to userspace. No session is started and no process watch is installed, yet the caller sees success. It would then assume fail-on-exit protection is active, and writes could still stall until the deadline timer fires. Should ret be set to -EINVAL before this goto?
The older argument checks in this block have the same problem, which the cover text says is tracked separately. This check is a new instance of it.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261118-vstor-153891-v1-1-f31daea66355@virtuozzo.com?part=1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-18 12:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 12:21 Vasileios Almpanis
2026-11-18 12:27 ` no-reply [this message]
2026-11-18 12:30 ` Denis V. Lunev
2026-11-18 12:47 ` 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=010701a1eea05d22-c19a7264-e525-495f-b863-399f0c1358aa-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