Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mtd: fix race in cfi_cmdset_0001 driver
As inval_cache_and_wait_for_operation() drop and reclaim the lock to invalidate the cache, some other thread may suspend the operation before reaching the for(;;) loop. Therefore the loop must start with checking the chip->state before reading status from the chip. Signed-off-by: Joakim Tjernlund <[email protected]> Acked-by: Michael Cashwell <[email protected]> Acked-by: Stefan Bigler <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Cc: [email protected]
- Loading branch information