* [PATCH] UBI: add missing kmem_cache_free() in process_pool_aeb error path
@ 2014-09-09 12:25 Richard Genoud
2014-09-09 21:43 ` Richard Weinberger
2014-09-16 15:21 ` Artem Bityutskiy
0 siblings, 2 replies; 4+ messages in thread
From: Richard Genoud @ 2014-09-09 12:25 UTC (permalink / raw)
To: Richard Weinberger
Cc: Richard Genoud, linux-mtd, linux-kernel, Artem Bityutskiy
I ran into this error after a ubiupdatevol, because I forgot to backport
e9110361a9a4 UBI: fix the volumes tree sorting criteria.
UBI error: process_pool_aeb: orphaned volume in fastmap pool
UBI error: ubi_scan_fastmap: Attach by fastmap failed, doing a full scan!
kmem_cache_destroy ubi_ainf_peb_slab: Slab cache still has objects
CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.18-00053-gf05cac8dbf85 #1
[<c000d298>] (unwind_backtrace) from [<c000baa8>] (show_stack+0x10/0x14)
[<c000baa8>] (show_stack) from [<c01b7a68>] (destroy_ai+0x230/0x244)
[<c01b7a68>] (destroy_ai) from [<c01b8fd4>] (ubi_attach+0x98/0x1ec)
[<c01b8fd4>] (ubi_attach) from [<c01ade90>] (ubi_attach_mtd_dev+0x2b8/0x868)
[<c01ade90>] (ubi_attach_mtd_dev) from [<c038b510>] (ubi_init+0x1dc/0x2ac)
[<c038b510>] (ubi_init) from [<c0008860>] (do_one_initcall+0x94/0x140)
[<c0008860>] (do_one_initcall) from [<c037aadc>] (kernel_init_freeable+0xe8/0x1b0)
[<c037aadc>] (kernel_init_freeable) from [<c02730ac>] (kernel_init+0x8/0xe4)
[<c02730ac>] (kernel_init) from [<c00093f0>] (ret_from_fork+0x14/0x24)
UBI: scanning is finished
Freeing the cache in the error path fixes the Slab error.
Tested on at91sam9g35 (3.14.18+fastmap backports)
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Cc: stable <stable@vger.kernel.org> # >= 3.10
---
drivers/mtd/ubi/fastmap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 0431b46d9fd9..c701369090fb 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -330,6 +330,7 @@ static int process_pool_aeb(struct ubi_device *ubi, struct ubi_attach_info *ai,
av = tmp_av;
else {
ubi_err("orphaned volume in fastmap pool!");
+ kmem_cache_free(ai->aeb_slab_cache, new_aeb);
return UBI_BAD_FASTMAP;
}
--
2.0.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] UBI: add missing kmem_cache_free() in process_pool_aeb error path
2014-09-09 12:25 [PATCH] UBI: add missing kmem_cache_free() in process_pool_aeb error path Richard Genoud
@ 2014-09-09 21:43 ` Richard Weinberger
2014-09-10 8:06 ` Richard Genoud
2014-09-16 15:21 ` Artem Bityutskiy
1 sibling, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2014-09-09 21:43 UTC (permalink / raw)
To: Richard Genoud; +Cc: linux-mtd, linux-kernel, Artem Bityutskiy
Am 09.09.2014 14:25, schrieb Richard Genoud:
> I ran into this error after a ubiupdatevol, because I forgot to backport
> e9110361a9a4 UBI: fix the volumes tree sorting criteria.
>
> UBI error: process_pool_aeb: orphaned volume in fastmap pool
> UBI error: ubi_scan_fastmap: Attach by fastmap failed, doing a full scan!
> kmem_cache_destroy ubi_ainf_peb_slab: Slab cache still has objects
> CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.18-00053-gf05cac8dbf85 #1
> [<c000d298>] (unwind_backtrace) from [<c000baa8>] (show_stack+0x10/0x14)
> [<c000baa8>] (show_stack) from [<c01b7a68>] (destroy_ai+0x230/0x244)
> [<c01b7a68>] (destroy_ai) from [<c01b8fd4>] (ubi_attach+0x98/0x1ec)
> [<c01b8fd4>] (ubi_attach) from [<c01ade90>] (ubi_attach_mtd_dev+0x2b8/0x868)
> [<c01ade90>] (ubi_attach_mtd_dev) from [<c038b510>] (ubi_init+0x1dc/0x2ac)
> [<c038b510>] (ubi_init) from [<c0008860>] (do_one_initcall+0x94/0x140)
> [<c0008860>] (do_one_initcall) from [<c037aadc>] (kernel_init_freeable+0xe8/0x1b0)
> [<c037aadc>] (kernel_init_freeable) from [<c02730ac>] (kernel_init+0x8/0xe4)
> [<c02730ac>] (kernel_init) from [<c00093f0>] (ret_from_fork+0x14/0x24)
> UBI: scanning is finished
>
> Freeing the cache in the error path fixes the Slab error.
>
> Tested on at91sam9g35 (3.14.18+fastmap backports)
>
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
> Cc: stable <stable@vger.kernel.org> # >= 3.10
I guess you wrote 3.10 because there is no stable kernel between >= 3.7 and < 3.10?
Patch looks good otherwise.
Acked-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] UBI: add missing kmem_cache_free() in process_pool_aeb error path
2014-09-09 21:43 ` Richard Weinberger
@ 2014-09-10 8:06 ` Richard Genoud
0 siblings, 0 replies; 4+ messages in thread
From: Richard Genoud @ 2014-09-10 8:06 UTC (permalink / raw)
To: Richard Weinberger
Cc: linux-mtd, linux-kernel@vger.kernel.org, Artem Bityutskiy
2014-09-09 23:43 GMT+02:00 Richard Weinberger <richard@nod.at>:
> Am 09.09.2014 14:25, schrieb Richard Genoud:
>> I ran into this error after a ubiupdatevol, because I forgot to backport
>> e9110361a9a4 UBI: fix the volumes tree sorting criteria.
>>
>> UBI error: process_pool_aeb: orphaned volume in fastmap pool
>> UBI error: ubi_scan_fastmap: Attach by fastmap failed, doing a full scan!
>> kmem_cache_destroy ubi_ainf_peb_slab: Slab cache still has objects
>> CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.18-00053-gf05cac8dbf85 #1
>> [<c000d298>] (unwind_backtrace) from [<c000baa8>] (show_stack+0x10/0x14)
>> [<c000baa8>] (show_stack) from [<c01b7a68>] (destroy_ai+0x230/0x244)
>> [<c01b7a68>] (destroy_ai) from [<c01b8fd4>] (ubi_attach+0x98/0x1ec)
>> [<c01b8fd4>] (ubi_attach) from [<c01ade90>] (ubi_attach_mtd_dev+0x2b8/0x868)
>> [<c01ade90>] (ubi_attach_mtd_dev) from [<c038b510>] (ubi_init+0x1dc/0x2ac)
>> [<c038b510>] (ubi_init) from [<c0008860>] (do_one_initcall+0x94/0x140)
>> [<c0008860>] (do_one_initcall) from [<c037aadc>] (kernel_init_freeable+0xe8/0x1b0)
>> [<c037aadc>] (kernel_init_freeable) from [<c02730ac>] (kernel_init+0x8/0xe4)
>> [<c02730ac>] (kernel_init) from [<c00093f0>] (ret_from_fork+0x14/0x24)
>> UBI: scanning is finished
>>
>> Freeing the cache in the error path fixes the Slab error.
>>
>> Tested on at91sam9g35 (3.14.18+fastmap backports)
>>
>> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
>> Cc: stable <stable@vger.kernel.org> # >= 3.10
>
> I guess you wrote 3.10 because there is no stable kernel between >= 3.7 and < 3.10?
Yes, that's right.
I checked that
git am 0001-UBI-add-missing-kmem_cache_free-in-process_pool_aeb-.patch
Applied correctly on 3.10.54, 3.12.28, 3.14.18, 3.16.2 and 3.17-rc4
> Patch looks good otherwise.
>
> Acked-by: Richard Weinberger <richard@nod.at>
>
> Thanks,
> //richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] UBI: add missing kmem_cache_free() in process_pool_aeb error path
2014-09-09 12:25 [PATCH] UBI: add missing kmem_cache_free() in process_pool_aeb error path Richard Genoud
2014-09-09 21:43 ` Richard Weinberger
@ 2014-09-16 15:21 ` Artem Bityutskiy
1 sibling, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2014-09-16 15:21 UTC (permalink / raw)
To: Richard Genoud; +Cc: Richard Weinberger, linux-mtd, linux-kernel
On Tue, 2014-09-09 at 14:25 +0200, Richard Genoud wrote:
> I ran into this error after a ubiupdatevol, because I forgot to backport
> e9110361a9a4 UBI: fix the volumes tree sorting criteria.
Pushed, thanks!
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-16 15:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-09 12:25 [PATCH] UBI: add missing kmem_cache_free() in process_pool_aeb error path Richard Genoud
2014-09-09 21:43 ` Richard Weinberger
2014-09-10 8:06 ` Richard Genoud
2014-09-16 15:21 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox