mbox series

[v2,0/2] zram: fix backing device setup issue

Message ID 20241209165717.94215-1-ryncsn@gmail.com (mailing list archive)
Headers show
Series zram: fix backing device setup issue | expand

Message

Kairui Song Dec. 9, 2024, 4:57 p.m. UTC
From: Kairui Song <kasong@tencent.com>

This series fixes two bugs of backing device setting:

- ZRAM should reject using a zero sized (or the uninitialized ZRAM
  device itself) as the backing device.
- Fix backing device leaking when removing a uninitialized ZRAM
  device.

V1: https://lore.kernel.org/linux-mm/20241204180224.31069-1-ryncsn@gmail.com/
Update from V1:
- Collect Review-by.
- Update fix for issue 2 as suggested by Sergey Senozhatsky.

Kairui Song (2):
  zram: refuse to use zero sized block device as backing device
  zram: fix uninitialized ZRAM not releasing backing device

 drivers/block/zram/zram_drv.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)