[PATCH] ubi: fastmap: fix slab corruption
Richard Weinberger
richard at nod.at
Mon Mar 20 09:22:24 PDT 2017
Rabin,
Am 20.03.2017 um 16:17 schrieb Rabin Vincent:
> From: Rabin Vincent <rabinv at axis.com>
>
> Booting with UBI fastmap and SLUB debugging enabled results in the
> following splats. The problem is that ubi_scan_fastmap() moves the
> fastmap blocks from the scan_ai (allocated in scan_fast()) to the ai
> allocated in ubi_attach(). This results in two problems:
>
> - When the scan_ai is freed, aebs which were allocated from its slab
> cache are still in use.
>
> - When the other ai is being destroyed in destroy_ai(), the
> arguments to kmem_cache_free() call are incorrect since aebs on its
> ->fastmap list were allocated with a slab cache from a differnt ai.
>
> Fix this by making a copy of the aebs in ubi_scan_fastmap() instead of
> moving them.
Is this new in 4.9? I'm a bit confused because I fixed such SLUB related
issues some time ago already in Fastmap.
Thanks,
//richard
More information about the linux-mtd
mailing list