diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-09-18 12:47:46 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-09-18 12:47:46 +0000 |
commit | 60b68f6e2f1d121a584652ce671b8055c28c0f56 (patch) | |
tree | 86a52ae808bed0093ea6667a984065cf84a96e6a /tools | |
parent | 1a7def45c600cc0e9d37feff4db05cf572046375 (diff) | |
download | upstream-60b68f6e2f1d121a584652ce671b8055c28c0f56.tar.gz upstream-60b68f6e2f1d121a584652ce671b8055c28c0f56.tar.bz2 upstream-60b68f6e2f1d121a584652ce671b8055c28c0f56.zip |
mips: Free memory when load_module fails (#14453)
The mips reloc patch introduced new allocations which were done before
add_unformed_module but never freed them in case of an error. A new hook in
Linux 3.19 called module_arch_freeing_init can be used for freeing memory
which were allocated during this init phase.
The problem can be seen when trying to load a module (via busybox insmod)
when it was already loaded.
free -m
for i in `seq 1 100`; do
/sbin/insmod /lib/modules/*/ath9k.ko >& /dev/null
done
free -m
This simple loop would leak ~3.2 MB.
Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
Backport of r46247
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@47004 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions