[Devel] [PATCH hci-8.1 v6 5/7] dm/push_backup: arm deadline timer under pb->lock
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Wed Nov 4 11:48:04 MSK 2026
> Both pb_timer_func() and postpone_if_required_for_backup() decide
> whether to arm the timer under pb->lock but call mod_timer() after
> dropping it, so the decisions can be applied out of order:
>
> CPU1 pb_timer_func() CPU2 postpone_if_required_for_backup()
> lock; deadline = S64_MAX
> unlock
> lock; nr_delayed = 1
> deadline_jiffies = now + timeout
> unlock
> mod_timer(timeout)
> mod_timer(from S64_MAX)
>
> The late mod_timer() of the callback overwrites the fresh deadline, and
> the write is delayed with the timer parked in a very distant future.
> [ ... ]
> Fixes: 62e07487348e ("dm: Add push backup driver")
> https://virtuozzo.atlassian.net/browse/VSTOR-152912
>
> Feature: dm-backup: push backup target driver
> Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261104083818.856720-1-andrey.zhadchenko@virtuozzo.com?part=5
More information about the Devel
mailing list