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).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJa9ZkKAAoJEABBurwxfuKYMGAP/17+fE/svhrSsTVoW2ijL/za
 v+tIb1fy+lynKb7nFw6pXiLZGGbVwI8yWhDGNAVPrLIzAAaevfE8UJg3X3dcJBHY
 p+J1dITQst6lDK5A6E/ttUmsOkHnjVBECKw2ltR+XsNvM+pTODpk9NJ87+9uN6Tk
 mdr4ZoKFB2qhyFC18qiBmt4eyqVNjCZ/rF9+oGg0riYPqrAY6lFHE4OFQcDi8sRQ
 F9/Ramf5v9rLx0IViQ0QKbgBtef4+XgTl0mb9QgHDOmgeFnqAc5qRdEzhiURNxym
 3N1zzp5WwRgC4eXRRMpWewW3Sr5smmrydGzjsT80U8f5HP+Zb6nm0nNznt4f/XyV
 Ief3vQDmPgtocA1JawFaYFv7zzBSRV3RG7fpnGqfHAHEMV3BDpG2zAjzSCczQcPT
 9xrJt7bAOBNxjkqVZ8muq4tuivauPLId+94BKhRB48I8sEULG2XN4aZaZpmm579G
 hZyXA7MnKuGZJwRFUMFUxTP0F5KEurMnzLFLLbhfhK/Uf+6HZNQmWIbsbQcPLIq4
 TtFltlj1PnyNKDAEGEw9Y08H1h4aw4rZQEBBsdTH4yEpaU9fDaziOR5MQtzfABdJ
 jO6aVLL/muiX1Amvcp8QZgHyGVod0zo2PQpqL9M4F+0ZwouyxHbhGytXEq4Fd39k
 6Y84GNpxYjAoQknSZoUj
 =UOAO
 -----END PGP SIGNATURE-----

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>
This commit is contained in:
Olof Johansson 2018-05-14 01:05:00 -07:00
commit 16145fff37

View File

@ -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 */