Re: mmc: core: fix possible use after free of host

2019-04-29 Thread Ulf Hansson
On Wed, 17 Apr 2019 at 10:29, Pan Bian wrote: > > 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 relea

Re: mmc: core: fix possible use after free of host

2019-04-26 Thread Mathieu Malaterre
On Wed, Apr 17, 2019 at 10:28 AM Pan Bian wrote: > > 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 re

mmc: core: fix possible use after free of host

2019-04-17 Thread Pan Bian
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