[Devel] [PATCH hci-8.1 v3 5/6] 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 09:28:52 MSK 2026
> When push_backup_write acks last delayed request it sets
> deadline_jiffies = S64_MAX and the next fired timer uses this
> for mod_timer(): expiry is set to some very distant future.
>
> Previously a later push_backup_write() would accidentally
> repair the expiry; since it no longer touches the timer, nothing
> does until stop.
>
> Make the decision and the arming atomic: call mod_timer() under
> pb->lock at both sites, and do not re-arm when nothing is delayed or
> the backup is not alive. mod_timer() and queue_work() are fine under
> a spinlock, and the timer base lock is dropped while the callback
> runs, so there is no lock inversion.
>
> The callback racing with push_backup_stop() was never handled either:
> [ ... ]
> only armed under pb->lock while pb->alive is set, and the callback
> itself is waited for. Drop it.
>
> 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/20261103061752.720813-1-andrey.zhadchenko@virtuozzo.com?part=5
More information about the Devel
mailing list