This is a note to let you know that I've just added the patch titled drm/msm: fix NULL-deref on snapshot tear down to the 6.3-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-msm-fix-null-deref-on-snapshot-tear-down.patch and it can be found in the queue-6.3 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From a465353b9250802f87b97123e33a17f51277f0b1 Mon Sep 17 00:00:00 2001 From: Johan Hovold <johan+linaro@xxxxxxxxxx> Date: Mon, 6 Mar 2023 11:07:15 +0100 Subject: drm/msm: fix NULL-deref on snapshot tear down From: Johan Hovold <johan+linaro@xxxxxxxxxx> commit a465353b9250802f87b97123e33a17f51277f0b1 upstream. In case of early initialisation errors and on platforms that do not use the DPU controller, the deinitilisation code can be called with the kms pointer set to NULL. Fixes: 98659487b845 ("drm/msm: add support to take dpu snapshot") Cc: stable@xxxxxxxxxxxxxxx # 5.14 Cc: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx> Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> Patchwork: https://patchwork.freedesktop.org/patch/525099/ Link: https://lore.kernel.org/r/20230306100722.28485-4-johan+linaro@xxxxxxxxxx Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/msm/msm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -242,7 +242,8 @@ static int msm_drm_uninit(struct device msm_fbdev_free(ddev); #endif - msm_disp_snapshot_destroy(ddev); + if (kms) + msm_disp_snapshot_destroy(ddev); drm_mode_config_cleanup(ddev); Patches currently in stable-queue which might be from johan+linaro@xxxxxxxxxx are queue-6.3/drm-msm-fix-vram-leak-on-bind-errors.patch queue-6.3/drm-msm-adreno-fix-runtime-pm-imbalance-at-gpu-load.patch queue-6.3/drm-msm-fix-workqueue-leak-on-bind-errors.patch queue-6.3/drm-msm-fix-drm-device-leak-on-bind-errors.patch queue-6.3/drm-msm-fix-missing-wq-allocation-error-handling.patch queue-6.3/drm-msm-fix-null-deref-on-irq-uninstall.patch queue-6.3/usb-dwc3-gadget-drop-dead-hibernation-code.patch queue-6.3/drm-msm-fix-null-deref-on-snapshot-tear-down.patch