Patch "media: atomisp: Add check for rgby_data memory allocation failure" 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: atomisp: Add check for rgby_data memory allocation failure

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-atomisp-add-check-for-rgby_data-memory-allocat.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 39632f4ffa97847fd215d7fcd682ebc851538e1b
Author: Li Huafei <lihuafei1@xxxxxxxxxx>
Date:   Mon Nov 4 22:50:51 2024 +0800

    media: atomisp: Add check for rgby_data memory allocation failure
    
    [ Upstream commit ed61c59139509f76d3592683c90dc3fdc6e23cd6 ]
    
    In ia_css_3a_statistics_allocate(), there is no check on the allocation
    result of the rgby_data memory. If rgby_data is not successfully
    allocated, it may trigger the assert(host_stats->rgby_data) assertion in
    ia_css_s3a_hmem_decode(). Adding a check to fix this potential issue.
    
    Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
    Signed-off-by: Li Huafei <lihuafei1@xxxxxxxxxx>
    Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20241104145051.3088231-1-lihuafei1@xxxxxxxxxx
    Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c
index 90aa8fc999ef8..34d8ffb7742d3 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_params.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_params.c
@@ -4356,6 +4356,8 @@ ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
 		goto err;
 	/* No weighted histogram, no structure, treat the histogram data as a byte dump in a byte array */
 	me->rgby_data = kvmalloc(sizeof_hmem(HMEM0_ID), GFP_KERNEL);
+	if (!me->rgby_data)
+		goto err;
 
 	IA_CSS_LEAVE("return=%p", me);
 	return me;




[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