Patch "drm/amd/display: Check denominator pbn_div before used" has been added to the 6.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

    drm/amd/display: Check denominator pbn_div before used

to the 6.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:
     drm-amd-display-check-denominator-pbn_div-before-use.patch
and it can be found in the queue-6.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 728f10b24eee32f4c9c9ec0fab2d70b632c1bc5d
Author: Alex Hung <alex.hung@xxxxxxx>
Date:   Tue Jun 18 16:21:20 2024 -0600

    drm/amd/display: Check denominator pbn_div before used
    
    [ Upstream commit 116a678f3a9abc24f5c9d2525b7393d18d9eb58e ]
    
    [WHAT & HOW]
    A denominator cannot be 0, and is checked before used.
    
    This fixes 1 DIVIDE_BY_ZERO issue reported by Coverity.
    
    Reviewed-by: Harry Wentland <harry.wentland@xxxxxxx>
    Signed-off-by: Jerry Zuo <jerry.zuo@xxxxxxx>
    Signed-off-by: Alex Hung <alex.hung@xxxxxxx>
    Tested-by: Daniel Wheeler <daniel.wheeler@xxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 0627961b7115..27e641f17628 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -7302,7 +7302,7 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
 			}
 		}
 
-		if (j == dc_state->stream_count)
+		if (j == dc_state->stream_count || pbn_div == 0)
 			continue;
 
 		slot_num = DIV_ROUND_UP(pbn, pbn_div);




[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