@@ -294,7 +294,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) {
@@ -371,7 +371,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) {
Otherwise we may hang if we are called from panic() through mtdoops. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> --- drivers/mtd/onenand/omap2.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)