1. 28 1月, 2015 4 次提交
  2. 13 12月, 2014 2 次提交
    • B
      mtd: tests: abort torturetest on erase errors · 68f29815
      Brian Norris 提交于
      The torture test should quit once it actually induces an error in the
      flash. This step was accidentally removed during refactoring.
      
      Without this fix, the torturetest just continues infinitely, or until
      the maximum cycle count is reached. e.g.:
      
         ...
         [ 7619.218171] mtd_test: error -5 while erasing EB 100
         [ 7619.297981] mtd_test: error -5 while erasing EB 100
         [ 7619.377953] mtd_test: error -5 while erasing EB 100
         [ 7619.457998] mtd_test: error -5 while erasing EB 100
         [ 7619.537990] mtd_test: error -5 while erasing EB 100
         ...
      
      Fixes: 6cf78358 ("mtd: mtd_torturetest: use mtd_test helpers")
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Cc: Akinobu Mita <akinobu.mita@gmail.com>
      Cc: <stable@vger.kernel.org>
      68f29815
    • A
      mtd: physmap_of: fix potential NULL dereference · 92b633a8
      Ard Biesheuvel 提交于
      On device remove, when testing the cmtd field of an of_flash
      struct to decide whether it is a concatenated device or not,
      we get a false positive on cmtd == NULL, and dereference it
      subsequently. This may occur if of_flash_remove() is called
      from the cleanup path of of_flash_probe().
      
      Instead, test for NULL first, and only then perform the test
      for a concatenated device.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      92b633a8
  3. 02 12月, 2014 1 次提交
  4. 01 12月, 2014 7 次提交
  5. 29 11月, 2014 1 次提交
  6. 26 11月, 2014 9 次提交
  7. 20 11月, 2014 3 次提交
  8. 07 11月, 2014 4 次提交
    • R
      UBI: Fix invalid vfree() · f38aed97
      Richard Weinberger 提交于
      The logic of vfree()'ing vol->upd_buf is tied to vol->updating.
      In ubi_start_update() vol->updating is set long before vmalloc()'ing
      vol->upd_buf. If we encounter a write failure in ubi_start_update()
      before vmalloc() the UBI device release function will try to vfree()
      vol->upd_buf because vol->updating is set.
      Fix this by allocating vol->upd_buf directly after setting vol->updating.
      
      Fixes:
      [   31.559338] UBI warning: vol_cdev_release: update of volume 2 not finished, volume is damaged
      [   31.559340] ------------[ cut here ]------------
      [   31.559343] WARNING: CPU: 1 PID: 2747 at mm/vmalloc.c:1446 __vunmap+0xe3/0x110()
      [   31.559344] Trying to vfree() nonexistent vm area (ffffc90001f2b000)
      [   31.559345] Modules linked in:
      [   31.565620]  0000000000000bba ffff88002a0cbdb0 ffffffff818f0497 ffff88003b9ba148
      [   31.566347]  ffff88002a0cbde0 ffffffff8156f515 ffff88003b9ba148 0000000000000bba
      [   31.567073]  0000000000000000 0000000000000000 ffff88002a0cbe88 ffffffff8156c10a
      [   31.567793] Call Trace:
      [   31.568034]  [<ffffffff818f0497>] dump_stack+0x4e/0x7a
      [   31.568510]  [<ffffffff8156f515>] ubi_io_write_vid_hdr+0x155/0x160
      [   31.569084]  [<ffffffff8156c10a>] ubi_eba_write_leb+0x23a/0x870
      [   31.569628]  [<ffffffff81569b36>] vol_cdev_write+0x226/0x380
      [   31.570155]  [<ffffffff81179265>] vfs_write+0xb5/0x1f0
      [   31.570627]  [<ffffffff81179f8a>] SyS_pwrite64+0x6a/0xa0
      [   31.571123]  [<ffffffff818fde12>] system_call_fastpath+0x16/0x1b
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      f38aed97
    • R
      UBI: Fix double free after do_sync_erase() · aa5ad3b6
      Richard Weinberger 提交于
      If the erase worker is unable to erase a PEB it will
      free the ubi_wl_entry itself.
      The failing ubi_wl_entry must not free()'d again after
      do_sync_erase() returns.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      aa5ad3b6
    • R
      UBI: vtbl: Use ubi_eba_atomic_leb_change() · b81000b6
      Richard Weinberger 提交于
      This is more a cosmetic change than a fix.
      By using ubi_eba_atomic_leb_change()
      we can guarantee that the first VTBL record is always
      correct and we don't really need the second one anymore.
      But we have to keep the second one to not break anything.
      
      Artem: add a comment
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      b81000b6
    • T
      UBI: Extend UBI layer debug/messaging capabilities · 32608703
      Tanya Brokhman 提交于
      If there is more then one UBI device mounted, there is no way to
      distinguish between messages from different UBI devices.
      Add device number to all ubi layer message types.
      
      The R/O block driver messages were replaced by pr_* since
      ubi_device structure is not used by it.
      
      Amended a bit by Artem.
      Signed-off-by: NTanya Brokhman <tlinder@codeaurora.org>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      32608703
  9. 06 11月, 2014 9 次提交