| b3e1edf2 | 27-Sep-2017 |
Tom Rini <trini@konsulko.com> |
UPSTREAM: fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
As reported by Coverity, we did not free dirnode in the case of failure. Do so now.
Change-Id: I6af93d24c33302d8911ff0021d1c1b067
UPSTREAM: fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
As reported by Coverity, we did not free dirnode in the case of failure. Do so now.
Change-Id: I6af93d24c33302d8911ff0021d1c1b067d2a2715 Reported-by: Coverity (CID: 131221) Cc: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit fa9ca8a5d271e0533f61222df2bd6fd512687dbd)
show more ...
|
| 29de6c91 | 22-Sep-2017 |
Tom Rini <trini@konsulko.com> |
UPSTREAM: fs/fat: Reduce stack usage
We have limited stack in SPL builds. Drop itrblock and move to malloc/free of itr to move this off of the stack. As part of this fix a double-free issue in fat
UPSTREAM: fs/fat: Reduce stack usage
We have limited stack in SPL builds. Drop itrblock and move to malloc/free of itr to move this off of the stack. As part of this fix a double-free issue in fat_size().
Change-Id: I2d8baa3a0b6ffa0f9591366a095d5e315c41fde8 Signed-off-by: Tom Rini <trini@konsulko.com> --- Rework to use malloc/free as moving this to a global overflows some SH targets. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 2460098cffacd18729262e3ed36656e6943783ed)
show more ...
|
| 85681a03 | 12-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
UPSTREAM: fs/fat: fix fatbuf leak
A new fatbuf was allocated by get_fs_info() (called by fat_itr_root()), but not freed, resulting in eventually running out of memory. Spotted by running 'ls -r' in
UPSTREAM: fs/fat: fix fatbuf leak
A new fatbuf was allocated by get_fs_info() (called by fat_itr_root()), but not freed, resulting in eventually running out of memory. Spotted by running 'ls -r' in a large FAT filesystem from Shell.efi.
fatbuf is mainly used to cache FAT entry lookups (get_fatent()).. possibly once fat_write.c it can move into the iterator to simplify this.
Change-Id: I194a2de30a177e9b377dc50c61a2af6106dd8820 Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Łukasz Majewski <lukma@denx.de> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 725ffdb5cbcc4b8a9726a68cc6ae0713266ba5a9)
show more ...
|
| 1d8c5dbb | 09-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
UPSTREAM: fs/fat: Clean up open-coded sector <-> cluster conversions
Use the clust_to_sect() helper that was introduced earlier, and add an inverse sect_to_clust(), plus update the various spots tha
UPSTREAM: fs/fat: Clean up open-coded sector <-> cluster conversions
Use the clust_to_sect() helper that was introduced earlier, and add an inverse sect_to_clust(), plus update the various spots that open-coded this conversion previously.
Change-Id: Ifb6a59cefda1491639dcd6e8ea32fd2490af13b5 Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 265edc03d5a19550d92cbd6e10631d5a15bdd1d5)
show more ...
|
| 271eb208 | 09-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
UPSTREAM: fs/fat: fix case for FAT shortnames
Noticed when comparing our output to linux. There are some lcase bits which control whether filename and/or extension should be downcase'd.
Change-Id:
UPSTREAM: fs/fat: fix case for FAT shortnames
Noticed when comparing our output to linux. There are some lcase bits which control whether filename and/or extension should be downcase'd.
Change-Id: I55dc1f9ef025dc3174158d06ed78d1f8b54e1335 Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Łukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 21a24c3bf35bac83d66ce4a48eb0c7dd8a7227cb)
show more ...
|
| d5fb8aea | 09-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
UPSTREAM: fat/fs: move ls to generic implementation
Add a generic implementation of 'ls' using opendir/readdir/closedir, and replace fat's custom implementation. Other filesystems should move to th
UPSTREAM: fat/fs: move ls to generic implementation
Add a generic implementation of 'ls' using opendir/readdir/closedir, and replace fat's custom implementation. Other filesystems should move to the generic implementation after they add opendir/readdir/closedir support.
Change-Id: I287d3cd6e97c0c1901518c5ae1bb0653c7299f9b Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Łukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 89191d626793490b579e1d36e7d7a4464a20f9f6)
show more ...
|
| 53ee50a1 | 09-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
UPSTREAM: fat/fs: remove a bunch of dead code
Spotted by chance, when trying to remove file_fat_ls(), I noticed there were some dead users of the API.
Change-Id: Iab669e5f9fd3840dbf1d7ebf026c682777
UPSTREAM: fat/fs: remove a bunch of dead code
Spotted by chance, when trying to remove file_fat_ls(), I noticed there were some dead users of the API.
Change-Id: Iab669e5f9fd3840dbf1d7ebf026c6827775186ab Signed-off-by: Rob Clark <robdclark@gmail.com> Acked-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 41fa83d1a6cdd8ddfb3fbe332252193ff8fb8b71)
show more ...
|
| 60352d22 | 09-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
UPSTREAM: fs/fat: implement opendir/readdir/closedir
Implement the readdir interface using the directory iterators.
Change-Id: I88123b039fa0644033847670027aca9d99bd4d2e Signed-off-by: Rob Clark <ro
UPSTREAM: fs/fat: implement opendir/readdir/closedir
Implement the readdir interface using the directory iterators.
Change-Id: I88123b039fa0644033847670027aca9d99bd4d2e Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Łukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 1f40366b319eac7eb02f8894fff5c94fbdb47d30)
show more ...
|
| b3800056 | 09-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
UPSTREAM: fs: add fs_readdir()
Needed to support efi file protocol. The fallback.efi loader wants to be able to read the contents of the /EFI directory to find an OS to boot.
Modelled after POSIX
UPSTREAM: fs: add fs_readdir()
Needed to support efi file protocol. The fallback.efi loader wants to be able to read the contents of the /EFI directory to find an OS to boot.
Modelled after POSIX opendir()/readdir()/closedir(). Unlike the other fs APIs, this is stateful (ie. state is held in the FS_DIR "directory stream"), to avoid re-traversing of the directory structure at each step. The directory stream must be released with closedir() when it is no longer needed.
Change-Id: I5a977a73024ff4646fc3c4f7c49993de0b5b6256 Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Łukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 4bbcc965f995564870ca02606137e60e873e0a1f)
show more ...
|
| fed831fc | 09-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
UPSTREAM: fs/fat: introduce new director iterators
Untangle directory traversal into a simple iterator, to replace the existing multi-purpose do_fat_read_at() + get_dentfromdir().
Change-Id: Iacf40
UPSTREAM: fs/fat: introduce new director iterators
Untangle directory traversal into a simple iterator, to replace the existing multi-purpose do_fat_read_at() + get_dentfromdir().
Change-Id: Iacf404e2ac7796adfa489d6e098c4d310635975a Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Łukasz Majewski <lukma@denx.de> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit c6e3baa565bc3b5828cf0d67ca6429dbe5f8687c)
show more ...
|