OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60cc43f
)
firmware: arm_scmi: Use after free in scmi_create_protocol_device()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 27 Apr 2018 14:06:49 +0000
(17:06 +0300)
committer
Sudeep Holla
<sudeep.holla@arm.com>
Tue, 8 May 2018 17:03:47 +0000
(18:03 +0100)
We need to return here instead of setting up the freed sdev device as a
transport.
Fixes:
907b6d14911d
("firmware: arm_scmi: add per-protocol channels support using idr objects")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/driver.c
patch
|
blob
|
history
diff --git
a/drivers/firmware/arm_scmi/driver.c
b/drivers/firmware/arm_scmi/driver.c
index
14b1471
..
2455be8
100644
(file)
--- 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 */