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

Andrew Stellman posted 4 patches 2 months, 2 weeks ago
drivers/block/zram/zram_drv.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
[PATCH 0/4] zram: fix four error-handling and input-validation bugs
Posted by Andrew Stellman 2 months, 2 weeks ago
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