On Thu 28 Mar 2019 11:33:55 AM CET, Vladimir Sementsov-Ogievskiy wrote: >>> All three functions that handle the BdrvChild.frozen attribute walk >>> the backing chain from 'bs' to 'base' and stop either when 'base' is >>> found or at the end of the chain if 'base' is NULL. >>> >>> However if 'base' is not found then the functions return without >>> errors as if it was NULL. >>> >>> This is wrong: if the caller passed an incorrect parameter that means >>> that there is a bug in the code. >>> >>> Signed-off-by: Alberto Garcia <be...@igalia.com> >> >> interesting that bdrv_is_allocated_above has the same flaw. Could you >> fix it too? > > However bdrv_is_allocated_above is differs from your functions, as it > may yield.. And graph may change while it is running.. Shouldn't we > freeze backing chain every time we want to call > bdrv_is_allocated_above?
I think all callers of bdrv_is_allocated_above() already freeze the chain themselves? Anyway I would not change this for 4.0 without an actual bug. Berto