Patch "remoteproc/mediatek: fix null pointer dereference on null scp pointer" has been added to the 5.8-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

    remoteproc/mediatek: fix null pointer dereference on null scp pointer

to the 5.8-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:
     remoteproc-mediatek-fix-null-pointer-dereference-on-.patch
and it can be found in the queue-5.8 subdirectory.

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



commit ba18054339a66172741ebfd4efb80a18d6977368
Author: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Date:   Fri Sep 18 16:24:28 2020 +0100

    remoteproc/mediatek: fix null pointer dereference on null scp pointer
    
    [ Upstream commit 434ac4d51407ce3764a6ae96a89d90b8ae2826fb ]
    
    Currently when pointer scp is null a dev_err is being called that
    references the pointer which is the very thing we are trying to
    avoid doing. Remove the extraneous error message to avoid this
    issue.
    
    Addresses-Coverity: ("Dereference after null check")
    Fixes: 63c13d61eafe ("remoteproc/mediatek: add SCP support for mt8183")
    Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200918152428.27258-1-colin.king@xxxxxxxxxxxxx
    Signed-off-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/remoteproc/mtk_scp_ipi.c b/drivers/remoteproc/mtk_scp_ipi.c
index 3d3d87210ef2c..58d1d7e571d66 100644
--- a/drivers/remoteproc/mtk_scp_ipi.c
+++ b/drivers/remoteproc/mtk_scp_ipi.c
@@ -30,10 +30,8 @@ int scp_ipi_register(struct mtk_scp *scp,
 		     scp_ipi_handler_t handler,
 		     void *priv)
 {
-	if (!scp) {
-		dev_err(scp->dev, "scp device is not ready\n");
+	if (!scp)
 		return -EPROBE_DEFER;
-	}
 
 	if (WARN_ON(id >= SCP_IPI_MAX) || WARN_ON(handler == NULL))
 		return -EINVAL;



[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