Felix Fietkau 60b68f6e2f 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
2015-09-18 12:47:46 +00:00
..
2015-04-11 10:28:06 +00:00
2015-05-28 13:45:33 +00:00
2015-09-11 10:48:34 +00:00
2015-05-27 14:57:38 +00:00
2015-03-13 03:02:34 +00:00
2015-05-29 11:28:33 +00:00
2015-05-21 19:32:46 +00:00
2015-09-11 10:48:34 +00:00
2015-05-21 19:32:46 +00:00
2015-06-17 10:22:04 +00:00
2015-05-29 11:28:20 +00:00
2015-05-27 15:34:30 +00:00
2015-09-11 10:48:34 +00:00
2015-05-21 19:32:46 +00:00
2015-03-28 13:20:52 +00:00
2015-05-28 12:25:45 +00:00
2010-08-06 21:36:35 +00:00