Skip to contentSkip to conversation

Crash during reboot due to 7628774 "mmc: core: Handle card shutdown from mmc_bus"

DISCUSSION Stephen Warren 2 participants 2 messages Jul 1, 2013 – Jul 2, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

It looks like commit 7628774 "mmc: core: Handle card shutdown from mmc_bus" causes a crash during "reboot" at least on Tegra platforms. The issue appears to be in:

Quoted 8 lines

static void mmc_bus_shutdown(struct device *dev)

{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = mmc_dev_to_card(dev);
	struct mmc_host *host = card->host;
	int ret;

	drv->shutdown(card);

Since drv == NULL.

Is this expected (and hence there's a missing guard on that function call), or is the root-cause some other issue?

#1 lore raw
Quoted 11 lines · Stephen Warren

It looks like commit 7628774 "mmc: core: Handle card shutdown from mmc_bus" causes a crash during "reboot" at least on Tegra platforms. The issue appears to be in:

Quoted 7 lines

static void mmc_bus_shutdown(struct device *dev)

{
      struct mmc_driver *drv = to_mmc_driver(dev->driver);
      struct mmc_card *card = mmc_dev_to_card(dev);
      struct mmc_host *host = card->host;
      int ret;
Quoted 6 lines
Quoted 1 line
      drv->shutdown(card);

Since drv == NULL.

Is this expected (and hence there's a missing guard on that function call), or is the root-cause some other issue?

Hi Stephen,

It is expected that drv is NULL, and obviously needs to be a check for it before calling it, my bad!

A fixup patch is on it's way asap.

Kind regards
Ulf Hansson