[Devel] [PATCH hci-8.1 v5 5/7] drivers/md/push_backup: arm deadline timer under pb->lock
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Tue Nov 3 15:48:30 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.
> [ ... ]
> pb->ctl_rwsem; the next patch removes that call.
>
> Fixes: 62e07487348e ("dm: Add push backup driver")
> https://virtuozzo.atlassian.net/browse/VSTOR-152912
> 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/20261103123802.846676-1-andrey.zhadchenko@virtuozzo.com?part=5
More information about the Devel
mailing list