diff options
author | Olof Johansson <olof@lixom.net> | 2018-05-14 10:05:00 +0200 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2018-05-14 10:05:00 +0200 |
commit | 16145fff375011ac7e82930aeb4dfa3b23a52ebe (patch) | |
tree | ee4e55a76f718dc7aa6520e9a6f77fb764e8b0dc /drivers/firmware | |
parent | Merge tag 'omap-for-v17/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
parent | firmware: arm_scmi: Use after free in scmi_create_protocol_device() (diff) | |
download | linux-16145fff375011ac7e82930aeb4dfa3b23a52ebe.tar.xz linux-16145fff375011ac7e82930aeb4dfa3b23a52ebe.zip |
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.c | 1 |
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 */ |