Skip to content

Commit 16145ff

Browse files
committed
Merge tag 'scmi-fixes-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into fixes
SCMI fix for v4.17 A single patch to ensure that the scmi device is not used for setting up scmi handle after it's freed(fixes use after free). * tag 'scmi-fixes-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Use after free in scmi_create_protocol_device() Signed-off-by: Olof Johansson <olof@lixom.net>
2 parents 602a424 + 31c6085 commit 16145ff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/firmware/arm_scmi/driver.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,7 @@ scmi_create_protocol_device(struct device_node *np, struct scmi_info *info,
778778
if (scmi_mbox_chan_setup(info, &sdev->dev, prot_id)) {
779779
dev_err(&sdev->dev, "failed to setup transport\n");
780780
scmi_device_destroy(sdev);
781+
return;
781782
}
782783

783784
/* setup handle now as the transport is ready */

0 commit comments

Comments
 (0)