[RFC PATCH 1/2] mtd: core: protect access to mtd devices while in suspend
Boris Brezillon
boris.brezillon at collabora.com
Fri Oct 8 09:08:11 PDT 2021
On Fri, 8 Oct 2021 17:35:26 +0200
Miquel Raynal <miquel.raynal at bootlin.com> wrote:
> > into suspend. But it's actually "mtd: rawnand: Simplify the locking" that
> > allows it to return errors rather than locking, before that commit it would
> > have waited for the rawnand device to resume.
>
> I don't think so, I believe it was broken in the same way but was just
> not returning errors.
Actually I was wrong, 013e6292aaf5 ("mtd: rawnand: Simplify the
locking") removed the blocking wait (returning -EBUSY when the device
is suspended instead of putting the thread on a waitqueue). At that
time, I assumed all threads would be paused when the device is
suspended, which appeared to be incorrect. So I guess the Fixes tag
should remain, and we might want to consider backporting a less
invasive patch to stable releases (one touching only the raw NAND
layer).
More information about the linux-mtd
mailing list