Re: [PATCH v2 1/2] UBI: Fastmap: free unused fastmap anchor peb during detach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 10, 2020 at 2:20 PM Hou Tao <houtao1@xxxxxxxxxx> wrote:
>
> When CONFIG_MTD_UBI_FASTMAP is enabled, fm_anchor will be assigned
> a free PEB during ubi_wl_init() or ubi_update_fastmap(). However
> if fastmap is not used or disabled on the MTD device, ubi_wl_entry
> related with the PEB will not be freed during detach.
>
> So Fix it by freeing the unused fastmap anchor during detach.
>
> Fixes: f9c34bb52997 ("ubi: Fix producing anchor PEBs")
> Reported-by: syzbot+f317896aae32eb281a58@xxxxxxxxxxxxxxxxxxxxxxxxx
> Reviewed-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> Signed-off-by: Hou Tao <houtao1@xxxxxxxxxx>
> ---
>  drivers/mtd/ubi/fastmap-wl.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> ---
> v2: patch splitting as suggested by Sascha

Both applied, thanks a lot!

-- 
Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux