Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e97adeca authored by Richard Weinberger's avatar Richard Weinberger Committed by Ian Maund
Browse files

UBI: Fix stale pointers in ubi->lookuptbl



In some error paths the WL sub-system gives up on a PEB
and frees it's ubi_wl_entry struct but does not set
the entry in ubi->lookuptbl to NULL.
Fastmap can stumble over such a stale pointer as it uses
ubi->lookuptbl to find all PEBs.

Fix this by introducing a new helper function which free()s
a WL entry and removes the reference from the lookup table.

Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Git-commit: ee59ba8b064f692a1dee99b6f3ba30b0e904b2c1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarNikhilesh Reddy <reddyn@codeaurora.org>
parent 5f4e95e2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment