]> git.baikalelectronics.ru Git - kernel.git/commit
UBI: Fix PEB leak in wear_leveling_worker()
authorRichard Weinberger <richard@nod.at>
Mon, 19 Aug 2013 06:48:12 +0000 (08:48 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 19 Aug 2013 15:15:11 +0000 (18:15 +0300)
commit40283ab39320fc8df961b9a36d1fb83cde86bd1e
treeacc970ed3980932f92e0b7a2440ba8335bae8ccd
parent2ba627179e83719b5c3ddae381a62bd73e860403
UBI: Fix PEB leak in wear_leveling_worker()

get_peb_for_wl() removes the PEB from the free list.
If the WL subsystem detects that no wear leveling is needed
it cancels the operation and drops the gained PEB.
In this case we have to put the PEB back into the free list.

This issue was introduced with commit 189c58a1d
(UBI: remove PEB from free tree in get_peb_for_wl()).

Cc: <stable@vger.kernel.org> # 3.7.x
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/ubi/wl.c