This pull request contains a single fix for MTD:

- Fix for a possible infinite loop in the cfi_cmdset_0002 driver
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCAA0FiEEdgfidid8lnn52cLTZvlZhesYu8EFAlyqCf4WHHJpY2hhcmRA
 c2lnbWEtc3Rhci5hdAAKCRBm+VmF6xi7wQbDD/94suc16vZ5YBONweRaxf+B19hq
 10VtuQe7gMIbQXPJh9MP4utQuw97WOHXRnDWyHibWffdozpUDGvayGMb++Vsa8Ck
 bKwLHP7oqWNjw+yEIXiB9XkQ4tRNZXMfOzMA9MGd4HjAAgtma00IH9xDDM7q3Fcf
 VUyOG4dXyhN78h1/y2dxukc6BldHpM8eJ8iKRPuk3xcTuFIXO/YwTKSGhaK4LJXh
 RkYs550IkmZalhKLU1ZA0CpPVJBedd8WlJ0K2dXuIPM/Ciyl7MMF5GyveVf7nMkO
 hUE7AJs7Qan+qQ6jfkS9B2G4I2VDY76SOKK3k6dGMYBxEKBnJhWHCCm5X/1hJnQ/
 QDxS1w3yQAAfAkphyoXI1xDdyrRHbEk5fwRNGyEwPsPaBvqT6uRVvYue/tS9QPJu
 bPPZLa4QY+7sekL7R0CiBiMttd5XQ3NyezQVCx9GST4A6Q1MDtNSo3CpRpwR38LK
 34xuXmUinK09ehf6VreBhQp3Gj4bhNs0HI8OUpeF4k4svKMlrjC0EtBQYF+PpCI8
 myZOqDI2KvPy30wS1gN5C7vt3tYbxuwbADRVhEgVgyr1PclU7NLzRi6LJaYM+02f
 3YJXLroPd6Xu1ZU+DmDQMdOZ1uf9M6IsUOiDczVfOs0klDWpROSphkPKedgZtxsj
 4HQPJYbP6rBJN5+KMA==
 =kUd0
 -----END PGP SIGNATURE-----

Merge tag 'mtd/fixes-for-5.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux

Pull MTD fix from Richard Weinberger:
 "A single fix for a possible infinite loop in the cfi_cmdset_0002
  driver"

* tag 'mtd/fixes-for-5.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer
This commit is contained in:
Linus Torvalds 2019-04-07 06:07:20 -10:00
commit 82331a70cc

View File

@ -1876,7 +1876,11 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
continue;
}
if (time_after(jiffies, timeo) && !chip_ready(map, adr))
/*
* We check "time_after" and "!chip_good" before checking "chip_good" to avoid
* the failure due to scheduling.
*/
if (time_after(jiffies, timeo) && !chip_good(map, adr, datum))
break;
if (chip_good(map, adr, datum)) {