]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mailbox: pcc: Fix an invalid-load caught by the address sanitizer
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 9 May 2022 14:17:16 +0000 (09:17 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:26:09 +0000 (10:26 +0200)
commit30eca958533f3dd0b124fc1a1ae926e3bd0c0a3a
tree53b124ae3c7ecbac6aee510b46f4b81476d68284
parent9e4b0c5b79af3b4e4bd371f37914627fdf5f304b
mailbox: pcc: Fix an invalid-load caught by the address sanitizer

[ Upstream commit 369e4ef87a8f5da7c348ec2c61ec5cd726e8337a ]

`pcc_mailbox_probe` doesn't initialize all memory that has been allocated
before the first time that one of it's members `txdone_irq` may be
accessed.

This leads to a an invalid load any time that this member is accessed:
[    2.429769] UBSAN: invalid-load in drivers/mailbox/pcc.c:684:22
[    2.430324] UBSAN: invalid-load in drivers/mailbox/mailbox.c:486:12
[    4.276782] UBSAN: invalid-load in drivers/acpi/cppc_acpi.c:314:45

Link: https://bugzilla.kernel.org/show_bug.cgi?id=215587
Fixes: ce028702ddbc ("mailbox: pcc: Move bulk of PCCT parsing into pcc_mbox_probe")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mailbox/pcc.c