[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADxeRw=_Qx+dcZHJZnq1tAStvsuCWrsARgyxP=aKC0WfLWHZLw@mail.gmail.com>
Date: Sat, 14 Jan 2012 13:05:08 +0800
From: Steven Liu <lingjiujianke@...il.com>
To: cjb@...top.org, linux-mmc@...r.kernel.org, liuqi@...ndersoft.com,
qinjian@...ndersoft.com
Cc: linux-kernel@...r.kernel.org, Greg KH <greg@...ah.com>
Subject: [PATCH] mmc: fix deadlock from mmc core when suspend the device
Hi Chris Ball & Greg KH,
This patch can fix the mmc deadlock when suspen the mmc devices.
when mmc_pm_notify to do the host->bus_ops->remove, there is deadlock,
because it was locked at mmc_claim_host, so it modify the mmc_claim_host
after the host->bus_ops->remove.
the problem can reproduce at lots of the emmc/sd devices when create
multi partitions,and I have tested this modify at lots of the platform.
Can this patch fixed?
Signed-off-by: LiuQi <liuqi@...ndersoft.com>
Signed-off-by: Jack Qin <qinjian@...ndersoft.com>
---
drivers/mmc/core/core.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 950b97d..e68a0e8 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2431,11 +2431,10 @@ int mmc_pm_notify(struct notifier_block *notify_block,
if (!host->bus_ops || host->bus_ops->suspend)
break;
- mmc_claim_host(host);
-
if (host->bus_ops->remove)
host->bus_ops->remove(host);
+ mmc_claim_host(host);
mmc_detach_bus(host);
mmc_power_off(host);
mmc_release_host(host);
--
1.7.7
Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists