Patch "drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()" has been added to the 6.1-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: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()

to the 6.1-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-is_err_or_null-vs-null-check-in-a5xx_sub.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 0568c05b610c3f99fb4fc76e74704225c1d8a748
Author: Gaosheng Cui <cuigaosheng1@xxxxxxxxxx>
Date:   Mon Jul 17 09:47:38 2023 +0800

    drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()
    
    [ Upstream commit 6e8a996563ecbe68e49c49abd4aaeef69f11f2dc ]
    
    The msm_gem_get_vaddr() returns an ERR_PTR() on failure, and a null
    is catastrophic here, so we should use IS_ERR_OR_NULL() to check
    the return value.
    
    Fixes: 6a8bd08d0465 ("drm/msm: add sudo flag to submit ioctl")
    Signed-off-by: Gaosheng Cui <cuigaosheng1@xxxxxxxxxx>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Reviewed-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
    Reviewed-by: Akhil P Oommen <quic_akhilpo@xxxxxxxxxxx>
    Patchwork: https://patchwork.freedesktop.org/patch/547712/
    Signed-off-by: Rob Clark <robdclark@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index 0829eaf2cd4e8..895a0e9db1f09 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -89,7 +89,7 @@ static void a5xx_submit_in_rb(struct msm_gpu *gpu, struct msm_gem_submit *submit
 			 * since we've already mapped it once in
 			 * submit_reloc()
 			 */
-			if (WARN_ON(!ptr))
+			if (WARN_ON(IS_ERR_OR_NULL(ptr)))
 				return;
 
 			for (i = 0; i < dwords; i++) {



[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