mtd: OneNAND: do not use DMA if oops in progress
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Feb 26 10:59:01 EST 2010
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=932f5d21ccd2705f1fb22e8a9e0da42013dcee17
Commit: 932f5d21ccd2705f1fb22e8a9e0da42013dcee17
Parent: 7d70f334ad2bf1b3aaa1f0699c0f442e14bcc9e0
Author: Aaro Koskinen <aaro.koskinen at nokia.com>
AuthorDate: Wed Feb 10 19:03:19 2010 +0200
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Feb 26 13:22:01 2010 +0000
mtd: OneNAND: do not use DMA if oops in progress
Otherwise we may hang if we are called from panic() through mtdoops.
Signed-off-by: Aaro Koskinen <aaro.koskinen at nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/onenand/omap2.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 75f38b9..dfbab6c 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -308,7 +308,7 @@ static int omap3_onenand_read_bufferram(struct mtd_info *mtd, int area,
goto out_copy;
/* panic_write() may be in an interrupt context */
- if (in_interrupt())
+ if (in_interrupt() || oops_in_progress)
goto out_copy;
if (buf >= high_memory) {
@@ -385,7 +385,7 @@ static int omap3_onenand_write_bufferram(struct mtd_info *mtd, int area,
goto out_copy;
/* panic_write() may be in an interrupt context */
- if (in_interrupt())
+ if (in_interrupt() || oops_in_progress)
goto out_copy;
if (buf >= high_memory) {
More information about the linux-mtd-cvs
mailing list