* [PATCH RESEND] powerpc/rtas_flash: Free kmem upon module exit
@ 2013-04-19 11:48 Vasant Hegde
2013-04-21 23:27 ` Michael Ellerman
0 siblings, 1 reply; 4+ messages in thread
From: Vasant Hegde @ 2013-04-19 11:48 UTC (permalink / raw)
To: benh, linuxppc-dev, paulus
Memory allocated to flash_block_list in rtas_flash_write
is not freed during module exit. We hit below call trace
if we unload rtas_flash module after loading new firmware
image and before rebooting the system.
Feb 6 08:42:10 eagle3 kernel: kmem_cache_destroy rtas_flash_cache: Slab cache still has objects
Feb 6 08:42:10 eagle3 kernel: Call Trace:
Feb 6 08:42:10 eagle3 kernel: [c00000001c303b40] [c000000000014940] .show_stack+0x70/0x1c0 (unreliable)
Feb 6 08:42:10 eagle3 kernel: [c00000001c303bf0] [c000000000199bec] .kmem_cache_destroy+0x15c/0x170
Feb 6 08:42:10 eagle3 kernel: [c00000001c303c90] [d000000006fa1208] .rtas_flash_cleanup+0x3c/0x80 [rtas_flash]
Feb 6 08:42:10 eagle3 kernel: [c00000001c303e30] [c000000000009954] syscall_exit+0x0/0x94
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
arch/powerpc/kernel/rtas_flash.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index c642f01..a7020d2 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -790,6 +790,11 @@ static void __exit rtas_flash_cleanup(void)
{
rtas_flash_term_hook = NULL;
+ if (rtas_firmware_flash_list) {
+ free_flash_list(rtas_firmware_flash_list);
+ rtas_firmware_flash_list = NULL;
+ }
+
if (flash_block_cache)
kmem_cache_destroy(flash_block_cache);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] powerpc/rtas_flash: Free kmem upon module exit
2013-04-19 11:48 [PATCH RESEND] powerpc/rtas_flash: Free kmem upon module exit Vasant Hegde
@ 2013-04-21 23:27 ` Michael Ellerman
2013-04-22 5:48 ` Vasant Hegde
0 siblings, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2013-04-21 23:27 UTC (permalink / raw)
To: Vasant Hegde; +Cc: linuxppc-dev, paulus
On Fri, Apr 19, 2013 at 05:18:09PM +0530, Vasant Hegde wrote:
> Memory allocated to flash_block_list in rtas_flash_write
> is not freed during module exit. We hit below call trace
> if we unload rtas_flash module after loading new firmware
> image and before rebooting the system.
Why the resend? Did anything change?
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] powerpc/rtas_flash: Free kmem upon module exit
2013-04-21 23:27 ` Michael Ellerman
@ 2013-04-22 5:48 ` Vasant Hegde
2013-04-22 6:33 ` Michael Ellerman
0 siblings, 1 reply; 4+ messages in thread
From: Vasant Hegde @ 2013-04-22 5:48 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, paulus
Michael,
On Mon 22 Apr 2013 04:57:57 AM IST, Michael Ellerman wrote:
> On Fri, Apr 19, 2013 at 05:18:09PM +0530, Vasant Hegde wrote:
>> Memory allocated to flash_block_list in rtas_flash_write
>> is not freed during module exit. We hit below call trace
>> if we unload rtas_flash module after loading new firmware
>> image and before rebooting the system.
>
> Why the resend? Did anything change?
>
Nothing is changed. I resent because it was not reviewed for long time.
-Vasant
> cheers
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] powerpc/rtas_flash: Free kmem upon module exit
2013-04-22 5:48 ` Vasant Hegde
@ 2013-04-22 6:33 ` Michael Ellerman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2013-04-22 6:33 UTC (permalink / raw)
To: Vasant Hegde; +Cc: linuxppc-dev, paulus
On Mon, Apr 22, 2013 at 11:18:00AM +0530, Vasant Hegde wrote:
> Michael,
>
> On Mon 22 Apr 2013 04:57:57 AM IST, Michael Ellerman wrote:
> >On Fri, Apr 19, 2013 at 05:18:09PM +0530, Vasant Hegde wrote:
> >>Memory allocated to flash_block_list in rtas_flash_write
> >>is not freed during module exit. We hit below call trace
> >>if we unload rtas_flash module after loading new firmware
> >>image and before rebooting the system.
> >
> >Why the resend? Did anything change?
> >
>
> Nothing is changed. I resent because it was not reviewed for long time.
It's in my test branch, which is in linux-next:
https://github.com/mpe/powerpc-test
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-22 6:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-19 11:48 [PATCH RESEND] powerpc/rtas_flash: Free kmem upon module exit Vasant Hegde
2013-04-21 23:27 ` Michael Ellerman
2013-04-22 5:48 ` Vasant Hegde
2013-04-22 6:33 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).