1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 16:06:04 -05:00
linux/drivers/block/zram
Kairui Song 74363ec674 zram: fix uninitialized ZRAM not releasing backing device
Setting backing device is done before ZRAM initialization.  If we set the
backing device, then remove the ZRAM module without initializing the
device, the backing device reference will be leaked and the device will be
hold forever.

Fix this by always reset the ZRAM fully on rmmod or reset store.

Link: https://lkml.kernel.org/r/20241209165717.94215-3-ryncsn@gmail.com
Fixes: 013bf95a83 ("zram: add interface to specif backing device")
Signed-off-by: Kairui Song <kasong@tencent.com>
Reported-by: Desheng Wu <deshengwu@tencent.com>
Suggested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-12-18 19:04:44 -08:00
..
backend_842.c
backend_842.h
backend_deflate.c
backend_deflate.h
backend_lz4.c
backend_lz4.h
backend_lz4hc.c
backend_lz4hc.h
backend_lzo.c
backend_lzo.h
backend_lzorle.c
backend_lzorle.h
backend_zstd.c
backend_zstd.h
Kconfig zram: ZRAM_DEF_COMP should depend on ZRAM 2024-11-11 17:22:27 -08:00
Makefile
zcomp.c
zcomp.h
zram_drv.c zram: fix uninitialized ZRAM not releasing backing device 2024-12-18 19:04:44 -08:00
zram_drv.h zram: remove UNDER_WB and simplify writeback 2024-11-05 16:56:23 -08:00