[PATCH] mtd: nand: omap: fix race condition in omap_wait()

Artem Bityutskiy dedekind1 at gmail.com
Fri Apr 27 01:50:21 EDT 2012


On Tue, 2012-04-17 at 13:11 +0200, Ivan Djelic wrote:
> If a context switch occurs in function omap_wait() just before the
> while loop is entered, then upon return from context switch the
> timeout may already have elapsed: in that case, status is never
> read from NAND device, and omap_wait() returns an error.
> This failure has been experimentally observed during stress tests.
> 
> This patch ensures a NAND status read is always performed before
> returning, as in the generic nand_wait() function.
> 
> Signed-off-by: Ivan Djelic <ivan.djelic at parrot.com>

Pushed this one to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120427/88e6de62/attachment.sig>


More information about the linux-mtd mailing list