[U-Boot] [PATCH] fs/fat: fix fatbuf leak

Simon Glass sjg at chromium.org
Wed Sep 13 04:27:41 UTC 2017


On 12 September 2017 at 14:40, Rob Clark <robdclark at gmail.com> wrote:
> 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.
>
> Signed-off-by: Rob Clark <robdclark at gmail.com>
> ---
> I can squash this back in to the earlier readdir patches and resend
> them if that is preferred.
>
>  fs/fat/fat.c | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list