Re: [PATCHv3 1/4] zram: introduce writeback bio batching support
From: Yuwen Chen
Date: Mon Nov 17 2025 - 22:38:04 EST
On Tue, 18 Nov 2025 11:18:56 +0800, Yuwen Chen wrote:
>> + /*
>> + * We release slot lock during writeback so slot can change under us:
>> + * slot_free() or slot_free() and zram_write_page(). In both cases
>> + * slot loses ZRAM_PP_SLOT flag. No concurrent post-processing can
>> + * set ZRAM_PP_SLOT on such slots until current post-processing
>> + * finishes.
>> + */
>> + if (!zram_test_flag(zram, index, ZRAM_PP_SLOT))
>> + goto out;
>In this place, the index may be leaked.
To be precise, blk_idx may be leaked.