Patch "ca8210: Fix crash by zero initializing data" has been added to the 6.0-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 6.0-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-6.0 subdirectory.

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



commit 5731afb0e8aa7ed75f66a5190b80f9dae0120ca3
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 450b16ad40a4..e1a569b99e4a 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -885,7 +885,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