Patch "ca8210: Fix crash by zero initializing data" 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

    ca8210: Fix crash by zero initializing data

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:
     ca8210-fix-crash-by-zero-initializing-data.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 ccb77d5f08dd4164fb8e8ccc5b9f0bc61573f13f
Author: Hauke Mehrtens <hauke@xxxxxxxxxx>
Date:   Mon Nov 21 01:22:01 2022 +0100

    ca8210: Fix crash by zero initializing data
    
    [ Upstream commit 1e24c54da257ab93cff5826be8a793b014a5dc9c ]
    
    The struct cas_control embeds multiple generic SPI structures and we
    have to make sure these structures are initialized to default values.
    This driver does not set all attributes. When using kmalloc before some
    attributes were not initialized and contained random data which caused
    random crashes at bootup.
    
    Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver")
    Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221121002201.1339636-1-hauke@xxxxxxxxxx
    Signed-off-by: Stefan Schmidt <stefan@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index fd9f33c833fa..95ef3b6f98dd 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -926,7 +926,7 @@ static int ca8210_spi_transfer(
 
 	dev_dbg(&spi->dev, "%s called\n", __func__);
 
-	cas_ctl = kmalloc(sizeof(*cas_ctl), GFP_ATOMIC);
+	cas_ctl = kzalloc(sizeof(*cas_ctl), GFP_ATOMIC);
 	if (!cas_ctl)
 		return -ENOMEM;
 



[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