Skip to content
Snippets Groups Projects
  1. Sep 14, 2018
  2. Sep 11, 2018
  3. Aug 20, 2018
  4. Aug 13, 2018
  5. Jul 25, 2018
  6. Jul 20, 2018
    • Marek Behún's avatar
      fs: btrfs: Fix wrong comparison in logical to physical mapping · f8c173b6
      Marek Behún authored and Tom Rini's avatar Tom Rini committed
      
      The comparison
        logical > item->logical + item->length
      in btrfs_map_logical_to_physical is wrong and should be instead
        logical >= item->logical + item->length
      For example, if
        item->logical = 4096
        item->length = 4096
      and we are looking for logical = 8192, it is not part of item (item is
      [4096, 8191]). But the comparison is false and we think we have found
      the correct item, although we should be searing in the right subtree.
      
      This fixes some bugs I encountered.
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      f8c173b6
  7. Jul 12, 2018
  8. Jun 18, 2018
    • Yevgeny Popovych's avatar
      fs: btrfs: Do not fail when all root_backups are empty · d146a7b9
      Yevgeny Popovych authored and Tom Rini's avatar Tom Rini committed
      
      This is the case when reading freshly created filesystem.
      The error message is like the following:
          btrfs_read_superblock: No valid root_backup found!
      
      Since the data from super_roots/root_backups is not actually used -
      decided to rework btrfs_newest_root_backup() into
      btrfs_check_super_roots() that will only check if super_roots
      array is valid and correctly handle empty scenario.
      
      As a result:
      * btrfs_read_superblock() now only checks if super_roots array is valid;
        the case when it is empty is considered OK.
      * removed root_backup pointer from btrfs_info,
        which would be NULL in case of empty super_roots.
      * btrfs_read_superblock() verifies number of devices from the superblock
        itself, not newest root_backup.
      
      Signed-off-by: default avatarYevgeny Popovych <yevgenyp@pointgrab.com>
      Cc: Marek Behun <marek.behun@nic.cz>
      Cc: Sergey Struzh <sergeys@pointgrab.com>
      d146a7b9
  9. Jun 13, 2018
    • Alexey Brodkin's avatar
      lib: Add hexdump · f8c987f8
      Alexey Brodkin authored and Tom Rini's avatar Tom Rini committed
      
      Often during debugging session it's very interesting to see
      what data we were dealing with. For example what we write or read
      to/from memory or peripherals.
      
      This change introduces functions that allow to dump binary
      data with one simple function invocation like:
      ------------------->8----------------
      print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len);
      ------------------->8----------------
      
      which gives us the following:
      ------------------->8----------------
      00000000: f2 b7 c9 88 62 61 75 64 72 61 74 65 3d 31 31 35  ....baudrate=115
      00000010: 32 30 30 00 62 6f 6f 74 61 72 67 73 3d 63 6f 6e  200.bootargs=con
      00000020: 73 6f 6c 65 3d 74 74 79 53 33 2c 31 31 35 32 30  sole=ttyS3,11520
      00000030: 30 6e 38 00 62 6f 6f 74 64 65 6c 61 79 3d 33 00  0n8.bootdelay=3.
      00000040: 62 6f 6f 74 66 69 6c 65 3d 75 49 6d 61 67 65 00  bootfile=uImage.
      00000050: 66 64 74 63 6f 6e 74 72 6f 6c 61 64 64 72 3d 39  fdtcontroladdr=9
      00000060: 66 66 62 31 62 61 30 00 6c 6f 61 64 61 64 64 72  ffb1ba0.loadaddr
      00000070: 3d 30 78 38 32 30 30 30 30 30 30 00 73 74 64 65  =0x82000000.stde
      00000080: 72 72 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32  rr=serial0@e0022
      00000090: 30 30 30 00 73 74 64 69 6e 3d 73 65 72 69 61 6c  000.stdin=serial
      000000a0: 30 40 65 30 30 32 32 30 30 30 00 73 74 64 6f 75  0@e0022000.stdou
      000000b0: 74 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 30  t=serial0@e00220
      000000c0: 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00..............
      ...
      ------------------->8----------------
      
      Source of hexdump.c was copied from Linux kernel v4.7-rc2.
      
      Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Mario Six <mario.six@gdsys.cc>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Stefan Roese <sr@denx.de>
      f8c987f8
    • Yevgeny Popovych's avatar
      fs: btrfs: Fix not all CHUNK_ITEMs being read from CHUNK_TREE · f5591801
      Yevgeny Popovych authored and Tom Rini's avatar Tom Rini committed
      
      This causes errors when translating logical addresses to physical:
        btrfs_map_logical_to_physical: Cannot map logical address <addr> to physical
        btrfs_file_read: Error reading extent
      
      The behavior of btrfs_map_logical_to_physical() is to stop traversing
      CHUNK_TREE when it encounters first non-CHUNK_ITEM, which makes
      only some portion of CHUNK_ITEMs being read.
      Change it to skip over non-chunk items.
      
      Signed-off-by: default avatarYevgeny Popovych <yevgenyp@pointgrab.com>
      Cc: Marek Behun <marek.behun@nic.cz>
      Cc: Sergey Struzh <sergeys@pointgrab.com>
      Reviewed-by: default avatarMarek Behun <marek.behun@nic.cz>
      f5591801
  10. May 30, 2018
  11. May 23, 2018
    • Eugen Hristev's avatar
      fs: ext4: fix crash on ext4ls · e71a969c
      Eugen Hristev authored and Tom Rini's avatar Tom Rini committed
      
      Found a crash while issuing ext4ls with a non-existent directory.
      Crash test:
      
      => ext4ls mmc 0 1
      ** Can not find directory. **
      data abort
      pc : [<3fd7c2ec>]          lr : [<3fd93ed8>]
      reloc pc : [<26f142ec>]    lr : [<26f2bed8>]
      sp : 3f963338  ip : 3fdc3dc4     fp : 3fd6b370
      r10: 00000004  r9 : 3f967ec0     r8 : 3f96db68
      r7 : 3fdc99b4  r6 : 00000000     r5 : 3f96dc88  r4 : 3fdcbc8c
      r3 : fffffffa  r2 : 00000000     r1 : 3f96e0bc  r0 : 00000002
      Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
      Resetting CPU ...
      
      resetting ...
      
      Tested on SAMA5D2_Xplained board (sama5d2_xplained_mmc_defconfig)
      
      Looks like crash is introduced by commit:
      "fa9ca8a5" fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
      
      Issue is that dirnode is not initialized, and then freed if the call
      to ext4_ls fails. ext4_ls will not change the value of dirnode in this case
      thus we have a crash with data abort.
      
      I added initialization and a check for dirname being NULL.
      
      Fixes: "fa9ca8a5" fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
      Cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      e71a969c
  12. May 09, 2018
  13. May 07, 2018
    • Tom Rini's avatar
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini authored
      
      When U-Boot started using SPDX tags we were among the early adopters and
      there weren't a lot of other examples to borrow from.  So we picked the
      area of the file that usually had a full license text and replaced it
      with an appropriate SPDX-License-Identifier: entry.  Since then, the
      Linux Kernel has adopted SPDX tags and they place it as the very first
      line in a file (except where shebangs are used, then it's second line)
      and with slightly different comment styles than us.
      
      In part due to community overlap, in part due to better tag visibility
      and in part for other minor reasons, switch over to that style.
      
      This commit changes all instances where we have a single declared
      license in the tag as both the before and after are identical in tag
      contents.  There's also a few places where I found we did not have a tag
      and have introduced one.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      83d290c5
  14. Apr 11, 2018
    • Bradley Bolen's avatar
      ubifs: Change value of mutex_is_locked() · 05ea83b6
      Bradley Bolen authored and Heiko Schocher's avatar Heiko Schocher committed
      
      The mutex lock and unlock functions are stubbed out and mutex_is_locked
      was 0.  This caused asserts to fail in ubifs code when checking that the
      mutex was locked.  For example,
      
      UBIFS assert failed in ubifs_change_lp at 540
      UBIFS assert failed in ubifs_release_lprops at 278
      
      Assume that the "mutex" is locked since that is the normal case when it
      is checked in the ubifs code.
      
      Signed-off-by: default avatarBradley Bolen <bradleybolen@gmail.com>
      05ea83b6
  15. Apr 06, 2018
  16. Mar 31, 2018
  17. Mar 24, 2018
    • Petr Vorel's avatar
      Convert CONFIG_UBIFS_SILENCE_MSG to Kconfig · afb6fda2
      Petr Vorel authored and Heiko Schocher's avatar Heiko Schocher committed
      
      Introduce another difference from upstream (kernel) source in
      fs/ubifs/super.c: adding preprocessor condition as y variable in
      mount_ubifs() depends on CONFIG_UBIFS_SILENCE_MSG:
      fs/ubifs/super.c:1337:15: error: variable ?y? set but not used [-Werror=unused-but-set-variable]
        long long x, y;
      
      Not setting CONFIG_UBIFS_SILENCE_MSG in am335x_igep003x_defconfig and
      igep0032_defconfig. Although it was defined in their config headers, it
      depends on CMD_UBIFS which is not set for them.
      
      Signed-off-by: default avatarPetr Vorel <petr.vorel@gmail.com>
      Cc: Joe Hershberger <joe.hershberger@ni.com>
      Cc: Heiko Schocher <hs@denx.de>
      afb6fda2
    • Petr Vorel's avatar
      ubifs: Reintroduce using CONFIG_UBIFS_SILENCE_MSG · e9951281
      Petr Vorel authored and Heiko Schocher's avatar Heiko Schocher committed
      
      Use of CONFIG_UBIFS_SILENCE_MSG was added in
      147162da ("ubi: ubifs: Turn off verbose prints")
      
      Then it was removed in
      ff94bc40 ("mtd, ubi, ubifs: resync with Linux-3.14")
      
      Cc: Joe Hershberger <joe.hershberger@ni.com>
      Cc: Heiko Schocher <hs@denx.de>
      Signed-off-by: default avatarPetr Vorel <petr.vorel@gmail.com>
      e9951281
  18. Mar 09, 2018
  19. Jan 29, 2018
  20. Jan 28, 2018
  21. Jan 22, 2018
  22. Jan 19, 2018
  23. Jan 10, 2018
  24. Dec 04, 2017
    • Masahiro Yamada's avatar
      mtd: nand: Rename nand.h into rawnand.h · 6ae3900a
      Masahiro Yamada authored
      
      This header was renamed to rawnand.h in Linux.
      
      The following is the corresponding commit in Linux.
      
        commit d4092d76a4a4e57b65910899948a83cc8646c5a5
        Author: Boris Brezillon <boris.brezillon@free-electrons.com>
        Date:   Fri Aug 4 17:29:10 2017 +0200
      
            mtd: nand: Rename nand.h into rawnand.h
      
            We are planning to share more code between different NAND based
            devices (SPI NAND, OneNAND and raw NANDs), but before doing that
            we need to move the existing include/linux/mtd/nand.h file into
            include/linux/mtd/rawnand.h so we can later create a nand.h header
            containing all common structure and function prototypes.
      
      Signed-off-by: Masahiro Yamada's avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      6ae3900a
  25. Nov 30, 2017
  26. Nov 21, 2017
  27. Nov 20, 2017
  28. Oct 23, 2017
  29. Oct 16, 2017
Loading