Commit e5265266 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: sdio: fix tear-down use-after-free

The mmc-driver private data must not be accessed after mmc_free_host()
has released it.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent d7849bff
......@@ -750,8 +750,8 @@ static void gb_sdio_connection_exit(struct gb_connection *connection)
flush_workqueue(gb_sdio_mrq_workqueue);
destroy_workqueue(gb_sdio_mrq_workqueue);
mmc_remove_host(mmc);
mmc_free_host(mmc);
kfree(host->xfer_buffer);
mmc_free_host(mmc);
}
static struct gb_protocol sdio_protocol = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment