[Devel] [PATCH hci-8.1 v7 1/8] block/blk-cbt: don't read a released cbt in blk_cbt_update_size()

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Wed Oct 28 13:16:19 MSK 2026


> blk_cbt_update_cbt_size() may replace the cbt in q->cbt_list and queue
> the old one for release, and blk_cbt_update_size() then reads the next
> entry through the old one. It holds only cbt_mutex, which doesn't delay
> the release, so the old cbt may already be freed.
> 
> Read the next entry before the call, with list_for_each_entry_safe():
> the replacement keeps it, and cbt_mutex excludes other list changes.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-149268
> Feature: cbt: changed block tracking (for backup)
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261028-ptikhomirov-vstor-149268-cbt-account-at-rq-start-v7-0-5c48672191c2@virtuozzo.com?part=1




More information about the Devel mailing list