summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/attach.c
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2020-07-07 16:41:00 +0300
committerRichard Weinberger <richard@nod.at>2020-08-03 00:56:13 +0300
commit3b185255bb2f34fa6927619b9ef27f192a3d9f5a (patch)
tree80bdf908124243d22548080f619d146461aac55b /drivers/mtd/ubi/attach.c
parentfcf44196305788b173748356a4f3ac2630454ba0 (diff)
downloadlinux-3b185255bb2f34fa6927619b9ef27f192a3d9f5a.tar.xz
ubi: fastmap: Don't produce the initial next anchor PEB when fastmap is disabled
Following process triggers a memleak caused by forgetting to release the initial next anchor PEB (CONFIG_MTD_UBI_FASTMAP is disabled): 1. attach -> __erase_worker -> produce the initial next anchor PEB 2. detach -> ubi_fastmap_close (Do nothing, it should have released the initial next anchor PEB) Don't produce the initial next anchor PEB in __erase_worker() when fastmap is disabled. Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Suggested-by: Sascha Hauer <s.hauer@pengutronix.de> Fixes: f9c34bb529975fe ("ubi: Fix producing anchor PEBs") Reported-by: syzbot+d9aab50b1154e3d163f5@syzkaller.appspotmail.com Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/ubi/attach.c')
0 files changed, 0 insertions, 0 deletions