public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* ubi: Error freeing ubi->vtbl while unloading
@ 2007-06-15 10:01 Vinit Agnihotri
  2007-06-17 12:49 ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Vinit Agnihotri @ 2007-06-15 10:01 UTC (permalink / raw)
  To: linux-mtd

I downloaded latest git & backported ubi to make it work in linux
kernel 2.6.18.3.

Machine details
 AMD opteron 64bit SMP, linux kernel version 2.6.18.3

However while unloading ubi I discovered slab corruption. Ths problem
is as follows.

ubi->vtbl is allocated using vmalloc() in vtbl.c empty_create_lvol(),
but it is freed in build.c with kfree()

Heres a patch that makes a fix

--- build.c	2007-06-07 14:54:49.000000000 +0530
+++ build.c	2007-06-15 15:22:32.000000000 +0530
@@ -369,7 +369,7 @@
 out_wl:
 	ubi_wl_close(ubi);
 out_vtbl:
-	kfree(ubi->vtbl);
+	vfree(ubi->vtbl);
 out_si:
 	ubi_scan_destroy_si(si);
 	return err;
@@ -629,7 +629,7 @@
 out_detach:
 	ubi_eba_close(ubi);
 	ubi_wl_close(ubi);
-	kfree(ubi->vtbl);
+	vfree(ubi->vtbl);
 out_free:
 	kfree(ubi);
 out_mtd:


-- I feel free now

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-18  6:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-15 10:01 ubi: Error freeing ubi->vtbl while unloading Vinit Agnihotri
2007-06-17 12:49 ` Artem Bityutskiy
2007-06-18  0:59   ` Josh Boyer
2007-06-18  6:45     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox