Re: [Letux-kernel] [Bug]: mtd: onenand: omap2plus: kernel panic with OneNAND on OMAP3 (DM3730) device GTA04A5

From: Andreas Kemnade
Date: Wed Apr 11 2018 - 00:59:34 EST


Hi Ladis,

On Tue, 10 Apr 2018 22:56:43 +0200
Ladislav Michl <ladis@xxxxxxxxxxxxxx> wrote:

> Hi Nikolaus,
>
> On Tue, Apr 10, 2018 at 06:25:17PM +0200, H. Nikolaus Schaller wrote:
> > Hi,
> > we just started testing the v4.16 kernel and found the
> > device no longer bootable (works with v4.15). It turned
> > out that there was a harmful modification somewhere between
> > v4.15.0 and v4.16-rc1.
> >
> > A git bisect points to this patch:
>
> Well, that's a shame... However, this code is in production for several
> months now, so could you, please put 'goto out_copy' if 'buf >= high_memory'
> condition is met, ie:
> --- a/drivers/mtd/nand/onenand/omap2.c
> +++ b/drivers/mtd/nand/onenand/omap2.c
> @@ -392,6 +392,7 @@ static int omap2_onenand_read_bufferram(struct mtd_info *mtd, int area,
> if (buf >= high_memory) {
> struct page *p1;
>
> + goto out_copy;
> if (((size_t)buf & PAGE_MASK) !=
> ((size_t)(buf + count - 1) & PAGE_MASK))
> goto out_copy;

I had the same problem here, and that snippet helps here. ubiattach
-p /dev/mtdX does not cause kernel oopses here anymore


Regards,
Andreas

Attachment: pgp9WTJQ_Dp5A.pgp
Description: OpenPGP digital signature