Pan Bian 8e1943af29 mmc: core: fix possible use after free of host
In the function mmc_alloc_host, the function put_device is called to
release allocated resources when mmc_gpio_alloc fails. Finally, the
function pointed by host->class_dev.class->dev_release (i.e.,
mmc_host_classdev_release) is used to release resources including the
host structure. However, after put_device, host is used and released
again. Resulting in a use-after-free bug.

Fixes: 1ed217194488 ("mmc: core: fix error path in mmc_host_alloc")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2019-05-06 11:55:39 +02:00
..
2019-02-28 09:16:18 +01:00
2018-12-17 09:01:15 +01:00
2019-03-01 09:50:10 +01:00
2018-12-17 09:01:15 +01:00
2019-03-08 14:12:17 -08:00
2016-12-05 10:31:08 +01:00