]> git.baikalelectronics.ru Git - kernel.git/commit
ca8210: Fix crash by zero initializing data
authorHauke Mehrtens <hauke@hauke-m.de>
Mon, 21 Nov 2022 00:22:01 +0000 (01:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Dec 2022 10:30:44 +0000 (11:30 +0100)
commitf97ff565555666a6ff95348ec105b70dca5c9259
treeca7a211f1b16f6af84876fd8522b47093385ddf3
parentd9bb0cb984a4a067cce81a062b11a1c7a569f8fc
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: 8c74c55c8213 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://lore.kernel.org/r/20221121002201.1339636-1-hauke@hauke-m.de
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ieee802154/ca8210.c