From: Aaro Koskinen Date: Wed, 10 Feb 2010 17:03:19 +0000 (+0200) Subject: mtd: OneNAND: do not use DMA if oops in progress X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=932f5d21ccd2705f1fb22e8a9e0da42013dcee17;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 75f38b95811e..dfbab6c72b74 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) {