Patch "drm/amd/display: Fix Coverity INTEGER_OVERFLOW within dal_gpio_service_create" 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: Fix Coverity INTEGER_OVERFLOW within dal_gpio_service_create

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-fix-coverity-integer_overflow-within.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 f0a5de71a0dd96ff2e08417d87cb75c5c71b5f17
Author: Hersen Wu <hersenxs.wu@xxxxxxx>
Date:   Fri Apr 26 11:58:11 2024 -0400

    drm/amd/display: Fix Coverity INTEGER_OVERFLOW within dal_gpio_service_create
    
    [ Upstream commit c6077aa66fa230d12f37fef01161ef080d13b726 ]
    
    [Why]
    For subtraction, coverity reports integer overflow
    warning message when variable type is uint32_t.
    
    [How]
    Change variable type to int32_t.
    
    Reviewed-by: Harry Wentland <harry.wentland@xxxxxxx>
    Acked-by: Tom Chung <chiahsuan.chung@xxxxxxx>
    Signed-off-by: Hersen Wu <hersenxs.wu@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/dc/gpio/gpio_service.c b/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
index d19d5c177022..f344478e9bd4 100644
--- a/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
+++ b/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
@@ -56,7 +56,7 @@ struct gpio_service *dal_gpio_service_create(
 	struct dc_context *ctx)
 {
 	struct gpio_service *service;
-	uint32_t index_of_id;
+	int32_t index_of_id;
 
 	service = kzalloc(sizeof(struct gpio_service), GFP_KERNEL);
 
@@ -112,7 +112,7 @@ struct gpio_service *dal_gpio_service_create(
 	return service;
 
 failure_2:
-	while (index_of_id) {
+	while (index_of_id > 0) {
 		--index_of_id;
 		kfree(service->busyness[index_of_id]);
 	}




[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