diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-11-11 17:32:25 +0100 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2010-12-14 23:40:15 +0100 |
commit | 79ec0bc0601b3c1bce4457361ec9d477b7982480 (patch) | |
tree | efd5796a8aba9b208a8ec12f0c106171993989ab | |
parent | 1442b66f3af5b6ecfb7d70f21c5d062f7c108e0b (diff) |
mmc: fix rmmod race for hosts using card-detection polling
commit d9bcbf343ec63e1104b5276195888ee06b4d086f upstream.
MMC hosts that poll for card detection by defining the MMC_CAP_NEEDS_POLL
flag have a race on rmmod, where the delayed work is cancelled without
waiting for completed polling. To prevent this a _sync version of the work
cancellation has to be used.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r-- | drivers/mmc/core/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 2876c3d80284..365997e28f32 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1160,7 +1160,7 @@ void mmc_stop_host(struct mmc_host *host) if (host->caps & MMC_CAP_DISABLE) cancel_delayed_work(&host->disable); - cancel_delayed_work(&host->detect); + cancel_delayed_work_sync(&host->detect); mmc_flush_scheduled_work(); /* clear pm flags now and let card drivers set them as needed */ |