]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 13:02:55 +0000 (14:02 +0100)
commit79afd616695e874684737866707aebac5a3b7264
treee318fbe5baadfaa62d312dcaa2f2e5cbe500b1ca
parent3bd285a5a58e6397b7c1170bc43692567e45bcc3
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@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>
(cherry picked from commit 246bcd05ba6cc43b34ac0bb4bac3ea94a4efa07c)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
drivers/net/ieee802154/ca8210.c