mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 02:06:49 +07:00
UBI: fix freeing ubi->vtbl while unloading
ubi->vtbl is allocated using vmalloc() in vtbl.c empty_create_lvol(), but it is freed in build.c with kfree() Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
parent
21600546ab
commit
d7f0c4dc31
@ -369,7 +369,7 @@ static int attach_by_scanning(struct ubi_device *ubi)
|
|||||||
out_wl:
|
out_wl:
|
||||||
ubi_wl_close(ubi);
|
ubi_wl_close(ubi);
|
||||||
out_vtbl:
|
out_vtbl:
|
||||||
kfree(ubi->vtbl);
|
vfree(ubi->vtbl);
|
||||||
out_si:
|
out_si:
|
||||||
ubi_scan_destroy_si(si);
|
ubi_scan_destroy_si(si);
|
||||||
return err;
|
return err;
|
||||||
@ -629,7 +629,7 @@ static int attach_mtd_dev(const char *mtd_dev, int vid_hdr_offset,
|
|||||||
out_detach:
|
out_detach:
|
||||||
ubi_eba_close(ubi);
|
ubi_eba_close(ubi);
|
||||||
ubi_wl_close(ubi);
|
ubi_wl_close(ubi);
|
||||||
kfree(ubi->vtbl);
|
vfree(ubi->vtbl);
|
||||||
out_free:
|
out_free:
|
||||||
kfree(ubi);
|
kfree(ubi);
|
||||||
out_mtd:
|
out_mtd:
|
||||||
|
Loading…
Reference in New Issue
Block a user