The patch titled mmc_test: initialize mmc_test_lock statically has been added to the -mm tree. Its filename is mmc_test-initialize-mmc_test_lock-statically.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: mmc_test: initialize mmc_test_lock statically From: Akinobu Mita <akinobu.mita@xxxxxxxxx> The mutex mmc_test_lock is initialized at every time mmc_test device is probed. Probing another mmc_test device may break the mutex, if the probe function is called while the mutex is locked. This patch fixes it by statically initializing mmc_test_lock. Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx> Cc: Pierre Ossman <drzeus-mmc@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/mmc/card/mmc_test.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff -puN drivers/mmc/card/mmc_test.c~mmc_test-initialize-mmc_test_lock-statically drivers/mmc/card/mmc_test.c --- a/drivers/mmc/card/mmc_test.c~mmc_test-initialize-mmc_test_lock-statically +++ a/drivers/mmc/card/mmc_test.c @@ -1040,7 +1040,7 @@ static const struct mmc_test_case mmc_te }; -static struct mutex mmc_test_lock; +static DEFINE_MUTEX(mmc_test_lock); static void mmc_test_run(struct mmc_test_card *test, int testcase) { @@ -1171,8 +1171,6 @@ static int mmc_test_probe(struct mmc_car if ((card->type != MMC_TYPE_MMC) && (card->type != MMC_TYPE_SD)) return -ENODEV; - mutex_init(&mmc_test_lock); - ret = device_create_file(&card->dev, &dev_attr_test); if (ret) return ret; _ Patches currently in -mm which might be from akinobu.mita@xxxxxxxxx are ibmasr-remove-unnecessary-spin_unlock.patch linux-next.patch mmc_block-handle-error-from-mmc_register_driver.patch mmc_test-initialize-mmc_test_lock-statically.patch anysee-initialize-anysee_usb_mutex-statically.patch ipr-use-memory_read_from_buffer.patch char-merge-ip2main-and-ip2base.patch char-ip2-cleanup-globals.patch char-ip2-fix-sparse-warnings.patch char-ip2-init-deinit-cleanup.patch ip2-avoid-add_timer-with-pending-timer.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html