summaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2018-05-14 01:05:00 -0700
committerOlof Johansson <olof@lixom.net>2018-05-14 01:05:00 -0700
commit16145fff375011ac7e82930aeb4dfa3b23a52ebe (patch)
treeee4e55a76f718dc7aa6520e9a6f77fb764e8b0dc /drivers/firmware
parent602a42420ef791c896f01cd0e6f91e6b44d9067d (diff)
parent31c6085562a03124d3f6a5c43dd9888ac44495a5 (diff)
downloadlinux-16145fff375011ac7e82930aeb4dfa3b23a52ebe.tar.bz2
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>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/arm_scmi/driver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 14b147135a0c..2455be8cbc4f 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -778,6 +778,7 @@ scmi_create_protocol_device(struct device_node *np, struct scmi_info *info,
if (scmi_mbox_chan_setup(info, &sdev->dev, prot_id)) {
dev_err(&sdev->dev, "failed to setup transport\n");
scmi_device_destroy(sdev);
+ return;
}
/* setup handle now as the transport is ready */