Re: Kernel Oops when trying to suspend with ubifs mounted onblock2mtd mtd device on 2.3.31-rc2

From: Tobias Diedrich
Date: Wed Jul 15 2009 - 15:16:13 EST


David Brownell wrote:
> On Wednesday 15 July 2009, Adrian Hunter wrote:
> > Looks like it might be related to MTD driver model updates.
>
> Not the sysfs support ... more likely the patch adding cls_suspend()
> support, 15bce40cb3133bcc07d548013df97e4653d363c1, is goofed. Maybe
> it's invoking suspend on the wrong device node...

Yes, that is the culprit.
AFAICS it uses the 'dev_to_mtd()' macro to get the mtd, but calls it
on itself instead of the child classes, so the resulting mtd device
pointer is bogus.

With some debug printks I get:

[...]
PM: Freed 0 kbytes in 0.06 seconds[...]
mtd_cls_suspend(f68e3180, 1)
dev->class->name = 'mtd'
callig mtd->suspend() [f68e3148]
BUG: unable to handle kernel paging request[...]
[...]

--
Tobias PGP: http://9ac7e0bc.uguu.de
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/