[syzbot] linux-next boot error: general protection fault in add_mtd_device

Christian Marangi ansuelsmth at gmail.com
Thu Jul 21 19:51:46 PDT 2022


On Fri, Jul 22, 2022 at 11:34:57AM +0900, Tetsuo Handa wrote:
> mtd_check_of_node() was added by commit ad9b10d1eaada169 ("mtd: core:
> introduce of support for dynamic partitions").
> 
> I guess that sometimes (depending on probe timing) mtd->parent is NULL.
> Please check what mtd->parent == NULL means.
> 
> +	/* Check if a partitions node exist */
> +       parent = mtd->parent;
> +       parent_dn = dev_of_node(&parent->dev);
>

Currently there is thix [1].

Anyway you comment means a device may probe defer and have the parent
still set to NULL? How can we check that?

Return PROBE_DEFER always when no mtd parent is found?

[1] https://patchwork.ozlabs.org/project/linux-mtd/patch/20220703095631.16508-1-ansuelsmth@gmail.com/

> On 2022/06/30 18:32, syzbot wrote:
> > Hello,
> > 
> > syzbot found the following issue on:
> > 
> > HEAD commit:    6cc11d2a1759 Add linux-next specific files for 20220630
> > git tree:       linux-next
> > console output: https://syzkaller.appspot.com/x/log.txt?x=1640f850080000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=54f75b620e3845dd
> > dashboard link: https://syzkaller.appspot.com/bug?extid=fe013f55a2814a9e8cfd
> > compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > 
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+fe013f55a2814a9e8cfd at syzkaller.appspotmail.com

-- 
	Ansuel



More information about the linux-mtd mailing list