[GIT PULL] JFFS2, UBI and UBIFS updates for v5.19-rc1

From: Richard Weinberger
Date: Fri Jun 03 2022 - 08:47:20 EST


Linus,

The following changes since commit 42226c989789d8da4af1de0c31070c96726d990c:

Linux 5.18-rc7 (2022-05-15 18:08:58 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git tags/for-linus-5.19-rc1

for you to fetch changes up to 8c03a1c21d72210f81cb369cc528e3fde4b45411:

ubi: ubi_create_volume: Fix use-after-free when volume creation failed (2022-05-27 16:49:41 +0200)

----------------------------------------------------------------
This pull request contains fixes for JFFS2, UBI and UBIFS

JFFS2:
- Fixes for a memory leak

UBI:
- Fixes for fastmap (UAF, high CPU usage)

UBIFS:
- Minor cleanups

----------------------------------------------------------------
Baokun Li (1):
jffs2: fix memory leak in jffs2_do_fill_super

Haowen Bai (2):
jffs2: Use kzalloc instead of kmalloc/memset
ubifs: Use NULL instead of using plain integer as pointer

Minghao Chi (1):
ubifs: Simplify the return expression of run_gc()

Zhihao Cheng (3):
ubi: fastmap: Fix high cpu usage of ubi_bgt by making sure wl_pool not empty
ubi: fastmap: Check wl_pool for free peb before wear leveling
ubi: ubi_create_volume: Fix use-after-free when volume creation failed

drivers/mtd/ubi/fastmap-wl.c | 121 +++++++++++++++++++++++++++++++++++--------
drivers/mtd/ubi/fastmap.c | 11 ----
drivers/mtd/ubi/ubi.h | 4 +-
drivers/mtd/ubi/vmt.c | 1 -
drivers/mtd/ubi/wl.c | 33 ++++++++----
drivers/mtd/ubi/wl.h | 2 +
fs/jffs2/erase.c | 6 +--
fs/jffs2/fs.c | 1 +
fs/ubifs/budget.c | 7 +--
fs/ubifs/xattr.c | 2 +-
10 files changed, 129 insertions(+), 59 deletions(-)