[ Sasha's backport helper bot ] Hi, ✅ All tests passed successfully. No issues detected. No action required from the submitter. The upstream commit SHA1 provided is correct: f364cdeb38938f9d03061682b8ff3779dd1730e5 WARNING: Author mismatch between patch and upstream commit: Backport author: <jianqi.ren.cn@xxxxxxxxxxxxx> Commit author: Liu Shixin<liushixin2@xxxxxxxxxx> Status in newer kernel trees: 6.13.y | Present (exact SHA1) 6.12.y | Present (different SHA1: 843d366ff197) Note: The patch differs from the upstream commit: --- 1: f364cdeb38938 ! 1: ececa37568222 zram: fix NULL pointer in comp_algorithm_show() @@ Metadata ## Commit message ## zram: fix NULL pointer in comp_algorithm_show() + [ Upstream commit f364cdeb38938f9d03061682b8ff3779dd1730e5 ] + LTP reported a NULL pointer dereference as followed: CPU: 7 UID: 0 PID: 5995 Comm: cat Kdump: loaded Not tainted 6.12.0-rc6+ #3 @@ Commit message Cc: Jens Axboe <axboe@xxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> + [This fix does not backport zram_comp_params_reset which was introduced after + v6.6, in commit f2bac7ad187d ("zram: introduce zcomp_params structure")] + Signed-off-by: Jianqi Ren <jianqi.ren.cn@xxxxxxxxxxxxx> + Signed-off-by: He Zhe <zhe.he@xxxxxxxxxxxxx> ## drivers/block/zram/zram_drv.c ## @@ drivers/block/zram/zram_drv.c: static int zram_add(void) zram->disk->private_data = zram; snprintf(zram->disk->disk_name, 16, "zram%d", device_id); - atomic_set(&zram->pp_in_progress, 0); -+ zram_comp_params_reset(zram); -+ comp_algorithm_set(zram, ZRAM_PRIMARY_COMP, default_compressor); ++ comp_algorithm_set(zram, ZRAM_PRIMARY_COMP, default_compressor); ++ /* Actual capacity set using sysfs (/sys/block/zram<id>/disksize */ set_capacity(zram->disk, 0); + /* zram devices sort of resembles non-rotational disks */ @@ drivers/block/zram/zram_drv.c: static int zram_add(void) if (ret) goto out_cleanup_disk; -- zram_comp_params_reset(zram); - comp_algorithm_set(zram, ZRAM_PRIMARY_COMP, default_compressor); - zram_debugfs_register(zram); --- Results of testing on various branches: | Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.6.y | Success | Success |