Patch "ice: Add check for devm_kzalloc()" has been added to the 6.6-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

    ice: Add check for devm_kzalloc()

to the 6.6-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:
     ice-add-check-for-devm_kzalloc.patch
and it can be found in the queue-6.6 subdirectory.

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



commit a0b0525bc1b24b24e3092d62717532443b3fb4ae
Author: Jiasheng Jiang <jiashengjiangcool@xxxxxxxxx>
Date:   Fri Jan 31 01:38:32 2025 +0000

    ice: Add check for devm_kzalloc()
    
    [ Upstream commit a8aa6a6ddce9b5585f2b74f27f3feea1427fb4e7 ]
    
    Add check for the return value of devm_kzalloc() to guarantee the success
    of allocation.
    
    Fixes: 42c2eb6b1f43 ("ice: Implement devlink-rate API")
    Signed-off-by: Jiasheng Jiang <jiashengjiangcool@xxxxxxxxx>
    Reviewed-by: Michal Swiatkowski <michal.swiatkowski@xxxxxxxxxxxxxxx>
    Link: https://patch.msgid.link/20250131013832.24805-1-jiashengjiangcool@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c
index 80dc5445b50d4..030ca0ef71d87 100644
--- a/drivers/net/ethernet/intel/ice/ice_devlink.c
+++ b/drivers/net/ethernet/intel/ice/ice_devlink.c
@@ -999,6 +999,9 @@ static int ice_devlink_rate_node_new(struct devlink_rate *rate_node, void **priv
 
 	/* preallocate memory for ice_sched_node */
 	node = devm_kzalloc(ice_hw_to_dev(pi->hw), sizeof(*node), GFP_KERNEL);
+	if (!node)
+		return -ENOMEM;
+
 	*priv = node;
 
 	return 0;




[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