linux/arch/powerpc
Vasant Hegde ad18a364f1 powerpc/rtas_flash: Free kmem upon module exit
Memory allocated to rtas_firmware_flash_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.

Call trace:
----------
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: [c00000001c303d20] [c0000000000f8970] .SyS_delete_module+0x1d0/0x2e0
Feb  6 08:42:10 eagle3 kernel: [c00000001c303e30] [c000000000009954] syscall_exit+0x0/0x94

This patch frees rtas_firmware_flash_list during module exit.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
2013-04-18 11:52:58 +10:00
..
boot Merge remote-tracking branch 'agust/next' into next 2013-02-20 11:39:05 +11:00
configs Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-02-23 17:09:55 -08:00
crypto powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit 2013-03-05 16:56:26 +11:00
include powerpc: Rename USER_ESID_BITS* to ESID_BITS* 2013-03-17 12:45:44 +11:00
kernel powerpc/rtas_flash: Free kmem upon module exit 2013-04-18 11:52:58 +10:00
kvm powerpc: Rename USER_ESID_BITS* to ESID_BITS* 2013-03-17 12:45:44 +11:00
lib uprobes/powerpc: Add dependency on single step emulation 2013-01-29 11:35:06 +11:00
math-emu powerpc/math_emu/efp: Look for errata handler when type mismatches 2011-10-06 23:36:47 -05:00
mm powerpc: Rename USER_ESID_BITS* to ESID_BITS* 2013-03-17 12:45:44 +11:00
net PPC: net: bpf_jit_comp: add VLAN instructions for BPF JIT 2012-11-17 22:12:47 -05:00
oprofile Merge branch 'merge' into next 2013-01-29 11:33:37 +11:00
perf perf/urgent fixes: 2013-03-18 10:00:56 +01:00
platforms powerpc: Use VPA subfunction macros instead of numbers for vpa calls 2013-04-18 11:52:58 +10:00
sysdev Merge remote-tracking branch 'agust/next' into next 2013-02-20 11:39:05 +11:00
xmon powerpc: Rename set_break to avoid naming conflict 2013-01-16 05:25:47 +11:00
Kconfig Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-03-18 08:12:41 -07:00
Kconfig.debug powerpc: IOMMU fault injection 2012-07-10 19:18:59 +10:00
Makefile powerpc: Avoid load of static chain register when calling nested functions through a pointer on 64bit 2013-01-10 17:01:27 +11:00
relocs_check.pl powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00