UBI issues with lpc32xx Was: UBI issues with 5.11.11

Miquel Raynal miquel.raynal at bootlin.com
Mon Apr 12 17:02:33 BST 2021


Hi Trevor,

Trevor Woerner <twoerner at gmail.com> wrote on Sun, 11 Apr 2021 22:29:47
-0400:

> Sorry for taking so long. Bisecting from 5.4.78 to 5.11.11 revealed a bunch of
> different issues.
> 
> In my original email I jumped "to the end" of the stable releases and found an
> issue with 5.11.11, but while bisecting I found things along the way.
> Hopefully I've isolated the first problem. I also decided to bisect along the
> Torvalds repository, hopefully that's the preferred way.
> 
> This is the issue, a NULL dereference:
> 
> 	Booting Linux on physical CPU 0x0
> 	Linux version 5.10.0-rc6-yocto-standard (oe-user at oe-host) (arm-oe-linux-gnueabi-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.36.1.20210209) #1 PREEMPT Mon Apr 12 01:52:55 UTC 2021
> 	CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=0005317f
>> 	nand: device found, Manufacturer ID: 0x01, Chip ID: 0xdc
> 	nand: AMD/Spansion S34ML04G1
> 	nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
> 	8<--- cut here ---
> 	Unable to handle kernel NULL pointer dereference at virtual address 00000018
> 	pgd = (ptrval)
> 	[00000018] *pgd=00000000
> 	Internal error: Oops: 5 [#1] PREEMPT ARM
> 	CPU: 0 PID: 1 Comm: swapper Not tainted 5.10.0-rc6-yocto-standard #1
> 	Hardware name: LPC32XX SoC (Flattened Device Tree)
> 	PC is at nand_ecc_sw_hamming_correct+0x18/0x3c
> 	LR is at lpc32xx_nand_read_page_syndrome+0xdc/0x130
> 	pc : [<c02d376c>]    lr : [<c02e048c>]    psr: 20000053
> 	sp : c0827b78  ip : c09d5820  fp : 00000000
> 	r10: c0827ccc  r9 : c02d3ef8  r8 : 00000000
> 	r7 : c08e0828  r6 : c4850000  r5 : 00000000  r4 : c09d5820
> 	r3 : 00000000  r2 : c0827b9c  r1 : c08e0828  r0 : c4850000
> 	Flags: nzCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment none
> 	Control: 0005317f  Table: 80004000  DAC: 00000053
> 	Process swapper (pid: 1, stack limit = 0x(ptrval))
> 	Stack: (0xc0827b78 to 0xc0828000)
> 	7b60:                                                       c09d5820 c4850000
> 	7b80: c08e0828 c02e048c 00000000 c0039480 c06c3760 00000028 00000018 ffffffff
> 	7ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c072170c 0000000a
> 	7bc0: c06fac40 c00095f8 00000001 c080f0e0 c080b000 00200140 ffff8b90 c06b7208
> 	7be0: c0827c10 c09d5820 c4850800 c4850000 00000800 c4850000 c02e03b0 c02d4a14
> 	7c00: 00000000 c004bb50 c0827ca0 00000000 0003ffc0 00000800 00000040 00000040
> 	7c20: 00000000 00000000 0003ffc0 00000000 00000000 00000800 00000000 00000001
> 	7c40: 00000001 00000000 c4850000 c09d58f8 00000000 00000000 00000000 00000000
> 	7c60: 0003ffc0 c09d5820 00000000 c09d5820 c0827ccc 00000000 00000000 00000000
> 	7c80: 1ffe0000 c02c58f0 c0827ccc c4850000 1ffe0000 c09d5820 c4850000 1ffe0000
> 	7ca0: 00000000 00000800 c0827ccc 00000000 c070d484 c02db644 c0827ccc 00000dc0
> 	7cc0: c4850000 c00bd1f4 000000dc 00000000 00000800 00000000 00000040 00000000
> 	7ce0: 00000000 c4850000 c4850800 c06b7208 c070d458 c09d5820 00000fff 00000fff
> 	7d00: c4850000 00000000 00000001 c02dc2cc 00000800 c070d458 00000001 00000000
> 	7d20: ffffffff 00000001 20000000 c070d484 00000006 0000024f 00000000 c09d5820
> 	7d40: 00000000 00000000 00000001 c4850000 000000dc c070d49c 000000dc c02dc7e0
> 	7d60: 000000dc 00000001 c070d458 c00cfb20 c0a4d6c0 c09d5820 c02c4804 c09d5000
> 	7d80: 00000000 c09d5820 00000000 00000000 00000001 00000001 000000dc 00000001
> 	7da0: 000000dc c02da618 00000800 00000040 00000001 00000000 00000000 00000001
> 	7dc0: 00000000 07bfa480 10bfb840 05953d6a c0616a89 c0616bc3 c062cf8f c062cf98
> 	7de0: c062cf9b c062cfa7 c0707d38 c06b7208 c0707d4c c09d5820 00000000 c08fac10
> 	7e00: c08fac00 07bfa480 10bfb840 05953d6a e101e101 c02e0b98 c0af2528 c0825b20
> 	7e20: c0701a08 e100e001 10bfb840 042fee10 00000400 c06b7208 00000001 c08fac10
> 	7e40: c070e1a8 00000000 c07430ec c070e1a8 00000000 c0653840 00000000 c02a0b98
> 	7e60: c08fac10 00000000 00000000 c029f614 00000000 c08fac10 c070e1a8 c070bf18
> 	7e80: c06aa838 c0721000 c0653840 c029fbb4 00000000 c08fac10 c070e1a8 c029fc78
> 	7ea0: c08fac10 c070e1a8 c029fbcc c029dde0 c070bf18 c080f36c c0810230 c06b7208
> 	7ec0: c070e1a8 c0a4d780 00000000 c029e52c c062e635 c062e63d 00000000 c070e1a8
> 	7ee0: ffffe000 00000000 c0721000 c02a02a4 c0699e74 ffffe000 00000000 c0683efc
> 	7f00: c08191ec c0618d51 00000000 c0032f00 00000001 c0653840 c06833d8 00000424
> 	7f20: 00000006 00000006 00000000 0000041f 00000000 c08191d5 c08191dd c06b7208
> 	7f40: 00000000 00000006 000000d4 c06b7208 c06aa854 00000007 000000d4 c08191a0
> 	7f60: c06aa858 c06841d8 00000006 00000006 00000000 c06833d8 00000000 c06b32f8
> 	7f80: 00000000 00000000 c053b81c 00000000 00000000 00000000 00000000 00000000
> 	7fa0: 00000000 c053b824 00000000 c0008520 00000000 00000000 00000000 00000000
> 	7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 	7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
> 	[<c02d376c>] (nand_ecc_sw_hamming_correct) from [<c02e048c>] (lpc32xx_nand_read_page_syndrome+0xdc/0x130)

I assumed I understood this trace well enough to write a patch. Can you
please give this change a try?

If it does not fix your issue, would you mind tracing down the issue to
the root dereference that produces this panic?

Also please share your entire boot log in case there is anything else
interesting (and perhaps your NAND DT node as well).

Thanks,
Miquèl



More information about the linux-mtd mailing list