From: Adrian Hunter Date: Mon, 23 Mar 2009 12:57:38 +0000 (+0200) Subject: [MTD] [OneNAND] omap2: panic_write may be in an interrupt context X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a29f280b739985a9e829d67af4d08e6584153495;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [MTD] [OneNAND] omap2: panic_write may be in an interrupt context panic_write may read in an interrupt context. Signed-off-by: Adrian Hunter Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 77a4f1446156..2c199b30ab58 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c @@ -294,6 +294,10 @@ static int omap3_onenand_read_bufferram(struct mtd_info *mtd, int area, if (bram_offset & 3 || (size_t)buf & 3 || count < 384) goto out_copy; + /* panic_write() may be in an interrupt context */ + if (in_interrupt()) + goto out_copy; + if (buf >= high_memory) { struct page *p1;