[PATCH 0/4] zram: fix four error-handling and input-validation bugs

From: Andrew Stellman

Date: Tue Apr 07 2026 - 08:39:07 EST


Four independent fixes for zram_drv.c:

1. read_from_bdev_async() silently drops the parent bio on allocation
failure, leaving I/O hanging. Complete it with BLK_STS_IOERR.

2. zram_bio_discard() returns without bio_endio() on the unaligned
single-fragment early-exit path.

3. recompress_store() accepts unrecognized type= values silently,
running recompression with no slot filter (mode == 0).

4. algorithm_params_store() allows mutation of compression parameters
after device initialization, unlike all peer sysfs store functions.

Andrew Stellman (4):
zram: complete parent bio on allocation failure in
read_from_bdev_async()
zram: call bio_endio() on early return in zram_bio_discard()
zram: reject unrecognized type= values in recompress_store()
zram: add init_done() guard to algorithm_params_store()

drivers/block/zram/zram_drv.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)

--
2.34.1