Re: [PATCH] liveupdate: check for duplicate session before growing block set
From: Pratyush Yadav
Date: Tue Nov 03 2026 - 11:15:07 EST
On Tue, Nov 03 2026, Christian Aurich Zanettini Martins wrote:
> luo_session_insert() grows the outgoing block set before checking for a
> duplicate session name. On -EEXIST the new block stays in the set.
>
> If the session count is an exact multiple of the per-block capacity (51
> with 4K pages), that block stays empty. It is serialized with count 0,
> which kho_block_set_restore() rejects in the next kernel:
>
> luo: Block contains invalid entry count: 0
> Kernel panic - not syncing: The incoming tree failed to initialize properly [-EINVAL], disabling live update
>
> Check for the duplicate before growing the block set, as
> luo_preserve_file() does with the token.
>
> Fixes: 2a441a14c2c0 ("liveupdate: Remove limit on the number of sessions")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@xxxxxxxxx>
Reviewed-by: Pratyush Yadav (Google) <pratyush@xxxxxxxxxx>
[...]
--
Regards,
Pratyush Yadav