On 4/21/23 15:17, Michał Kępień wrote:
Hi Petr,

Since the crash happens right after snand driver initialization, I think the
most likely candidate is this one:
fa4dc86e9808 kernel: backport MEMREAD ioctl

Maybe there are still some stack declarations of struct mtd_oob_ops left
that aren't fully initialized.

thanks for looking into that Felix, Michał any idea what might be wrong here?

I remember looking for uninitialized fields in all existing instances of
struct mtd_oob_ops in version 5.15.98 of the Linux kernel source tree
while preparing the MEMREAD backports.  However, it did not occur to me
to check OpenWRT-specific patches in the same way (sorry!) - and a naïve
search uncovers these two locations:

     $ git grep -E 'struct mtd_oob_ops [^=*{}]+;' -- 
':!target/linux/generic/backport-5.15/'
     
package/boot/uboot-mediatek/patches/100-07-mtd-nmbm-add-support-for-mtd.patch:+ 
struct mtd_oob_ops ops;
     
package/boot/uboot-mediatek/patches/100-07-mtd-nmbm-add-support-for-mtd.patch:+ 
struct mtd_oob_ops ops;
     
package/boot/uboot-mediatek/patches/100-11-env-add-support-for-NMBM-upper-MTD-layer.patch:+
     struct mtd_oob_ops ops;

These patches are applied to U-Boot and not the kernel. The "fa4dc86e9808 kernel: backport MEMREAD ioctl" change only changes he kernel.


Since the panic message includes mentions of a stack overflow, another
idea would be to backport this upstream patch as well:

     https://lore.kernel.org/linux-mtd/20230417205654.1982368-1-a...@kernel.org/

This patch has been reviewed, but it has not yet been merged anywhere.

Please send a patch to the openwrt mailing list or create a pull request on github.

hauke

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to