There are two issues: [1] data may change while ext4 is writing it to zram. [2] zram is written directly without checking the length after recompression, which may cause zs_obj to be damaged. This patch solves [2]. as you said: > zram cannot ensure that, it's not zram's job. Nothing stops > the buggy actor from modifiying the page at any random point, It is not zram's job to ensure that data is not modified. As long as there is re-compression, it must be confirmed again whether the length has changed. This way we can avoid zram panic caused by upper layer problems. So I think this patch should not be discarded. As for issues [1], i'm powerless.