Patch "media: venus: core: Fix a potential NULL pointer dereference in an error handling path" has been added to the 5.10-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

    media: venus: core: Fix a potential NULL pointer dereference in an error handling path

to the 5.10-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:
     media-venus-core-fix-a-potential-null-pointer-derefe.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 6e3dd734ef4e845063044db6c2b9b07c78277369
Author: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
Date:   Thu Aug 12 07:14:22 2021 +0200

    media: venus: core: Fix a potential NULL pointer dereference in an error handling path
    
    [ Upstream commit e4debea9be7d5db52bc6a565a4c02c3c6560d093 ]
    
    The normal path of the function makes the assumption that
    'pm_ops->core_power' may be NULL.
    We should make the same assumption in the error handling path or a NULL
    pointer dereference may occur.
    
    Add the missing test before calling 'pm_ops->core_power'
    
    Fixes: 9e8efdb57879 ("media: venus: core: vote for video-mem path")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@xxxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index bad553bf9f304..791ed1b1bbbd3 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -409,7 +409,8 @@ static __maybe_unused int venus_runtime_suspend(struct device *dev)
 err_video_path:
 	icc_set_bw(core->cpucfg_path, kbps_to_icc(1000), 0);
 err_cpucfg_path:
-	pm_ops->core_power(core, POWER_ON);
+	if (pm_ops->core_power)
+		pm_ops->core_power(core, POWER_ON);
 
 	return ret;
 }



[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