Patch "drm/msm/hdmi: Add missing check for alloc_ordered_workqueue" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/msm/hdmi: Add missing check for alloc_ordered_workqueue

to the 4.14-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-hdmi-add-missing-check-for-alloc_ordered_wor.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 11bed4905f9eb33b75ae7ddc2e46cfb33aec595a
Author: Jiasheng Jiang <jiasheng@xxxxxxxxxxx>
Date:   Fri Jan 6 10:30:11 2023 +0800

    drm/msm/hdmi: Add missing check for alloc_ordered_workqueue
    
    [ Upstream commit afe4cb96153a0d8003e4e4ebd91b5c543e10df84 ]
    
    Add check for the return value of alloc_ordered_workqueue as it may return
    NULL pointer and cause NULL pointer dereference in `hdmi_hdcp.c` and
    `hdmi_hpd.c`.
    
    Fixes: c6a57a50ad56 ("drm/msm/hdmi: add hdmi hdcp support (V3)")
    Signed-off-by: Jiasheng Jiang <jiasheng@xxxxxxxxxxx>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Patchwork: https://patchwork.freedesktop.org/patch/517211/
    Link: https://lore.kernel.org/r/20230106023011.3985-1-jiasheng@xxxxxxxxxxx
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
index c55e1920bfde7..4c02c057fc0d0 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
@@ -246,6 +246,10 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);
 
 	hdmi->workq = alloc_ordered_workqueue("msm_hdmi", 0);
+	if (!hdmi->workq) {
+		ret = -ENOMEM;
+		goto fail;
+	}
 
 	hdmi->i2c = msm_hdmi_i2c_init(hdmi);
 	if (IS_ERR(hdmi->i2c)) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux