From: Ivan Djelic Date: Tue, 17 Apr 2012 11:11:53 +0000 (+0200) Subject: mtd: nand: omap: fix race condition in omap_wait() X-Git-Tag: v3.5-rc1~8^2~58 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9c465f07c2dcd515d20b96f93470762f9ae08b6;p=pandora-kernel.git mtd: nand: omap: fix race condition in omap_wait() 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 Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- Reading git-diff-tree failed