diff options
author | John Crispin <john@openwrt.org> | 2015-07-07 13:48:27 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2015-07-07 13:48:27 +0000 |
commit | 8f0e96ee118781602ab67282b66a0b25fcf7692b (patch) | |
tree | accf167dbeb3dc6f070bcb476736bca4c236ad3a /target/linux/ar71xx/base-files/lib/preinit | |
parent | 7ab6409a89d829093dada5c7ad0e932fd996accd (diff) | |
download | upstream-8f0e96ee118781602ab67282b66a0b25fcf7692b.tar.gz upstream-8f0e96ee118781602ab67282b66a0b25fcf7692b.tar.bz2 upstream-8f0e96ee118781602ab67282b66a0b25fcf7692b.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>
SVN-Revision: 46247
Diffstat (limited to 'target/linux/ar71xx/base-files/lib/preinit')
0 files changed, 0 insertions, 0 deletions