Thanks Richard, although it would be better if you replied to greg's "failed to apply to 3.0-stable" e-mail.
Greg, please pick this amended patch. On Wed, 2012-09-12 at 09:03 +0200, Richard Genoud wrote: > From: Artem Bityutskiy <[email protected]> > > backport to v3.0.42 > > commit 78b495c39add820ab66ab897af9bd77a5f2e91f6 upstream > > UBI was mistakingly using 'kfree()' instead of 'kmem_cache_free()' when > freeing "attach eraseblock" structures in vtbl.c. Thankfully, this happened > only when we were doing auto-format, so many systems were unaffected. However, > there are still many users affected. > > It is strange, but the system did not crash and nothing bad happened when > the SLUB memory allocator was used. However, in case of SLOB we observed an > crash right away. > > This problem was introduced in 2.6.39 by commit > "6c1e875 UBI: add slab cache for ubi_scan_leb objects" > > Reported-by: Richard Genoud <[email protected]> > Cc: [email protected] [v2.6.39+] > Signed-off-by: Artem Bityutskiy <[email protected]> > Signed-off-by: Richard Genoud <[email protected]> > --- > drivers/mtd/ubi/vtbl.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c > index fd3bf77..326bd93 100644 > --- a/drivers/mtd/ubi/vtbl.c > +++ b/drivers/mtd/ubi/vtbl.c > @@ -356,7 +356,7 @@ retry: > */ > err = ubi_scan_add_used(ubi, si, new_seb->pnum, new_seb->ec, > vid_hdr, 0); > - kfree(new_seb); > + kmem_cache_free(si->scan_leb_slab, new_seb); > ubi_free_vid_hdr(ubi, vid_hdr); > return err; > > @@ -369,7 +369,7 @@ write_error: > list_add(&new_seb->u.list, &si->erase); > goto retry; > } > - kfree(new_seb); > + kmem_cache_free(si->scan_leb_slab, new_seb); > out_free: > ubi_free_vid_hdr(ubi, vid_hdr); > return err; -- Best Regards, Artem Bityutskiy
signature.asc
Description: This is a digitally signed message part
