Skip to content

Commit

Permalink
mtd: OneNAND: do not use DMA if oops in progress
Browse files Browse the repository at this point in the history
Otherwise we may hang if we are called from panic() through mtdoops.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Aaro Koskinen authored and David Woodhouse committed Feb 26, 2010
1 parent 7d70f33 commit 932f5d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/onenand/omap2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 932f5d2

Please sign in to comment.