]> git.baikalelectronics.ru Git - kernel.git/commit
ubifs: fix double return leb in ubifs_garbage_collect
authorBaokun Li <libaokun1@huawei.com>
Mon, 15 Nov 2021 01:31:43 +0000 (09:31 +0800)
committerRichard Weinberger <richard@nod.at>
Thu, 23 Dec 2021 21:28:23 +0000 (22:28 +0100)
commit674f860f47fc1e8b9a4c6e0ec32d6381e7de2060
treee02cb685339c7435445626520ecd116925833bfa
parent1f366138ad2865d53e981534409d676190e22c3e
ubifs: fix double return leb in ubifs_garbage_collect

If ubifs_garbage_collect_leb() returns -EAGAIN and enters the "out"
branch, ubifs_return_leb will execute twice on the same lnum. This
can cause data loss in concurrency situations.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/gc.c