diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-11-11 11:32:25 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2010-11-11 18:42:38 -0500 |
commit | d9bcbf343ec63e1104b5276195888ee06b4d086f (patch) | |
tree | 984a835176d14eb49c77cded4f56a1d130b45461 /drivers | |
parent | 35ac6f081f26e1b6b3482b9c8dfccebe7817c691 (diff) |
mmc: fix rmmod race for hosts using card-detection polling
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>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-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 8f86d702e46e..31ae07a36576 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -1559,7 +1559,7 @@ void mmc_stop_host(struct mmc_host *host) | |||
1559 | 1559 | ||
1560 | if (host->caps & MMC_CAP_DISABLE) | 1560 | if (host->caps & MMC_CAP_DISABLE) |
1561 | cancel_delayed_work(&host->disable); | 1561 | cancel_delayed_work(&host->disable); |
1562 | cancel_delayed_work(&host->detect); | 1562 | cancel_delayed_work_sync(&host->detect); |
1563 | mmc_flush_scheduled_work(); | 1563 | mmc_flush_scheduled_work(); |
1564 | 1564 | ||
1565 | /* clear pm flags now and let card drivers set them as needed */ | 1565 | /* clear pm flags now and let card drivers set them as needed */ |