mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-25 22:41:01 +01:00
It seems that we need to override all execmem alloc/free callbacks, not just for module. This is the default patch behavior in the 6.6 kernel. Fix the warning when the module is loaded: root@OpenWrt:~# insmod mtd-rw i_want_a_brick=1 [ 1404.954813] mtd-rw: mtd0: setting writeable flag [ 1404.959643] mtd-rw: mtd5: setting writeable flag [ 1404.966396] ------------[ cut here ]------------ [ 1404.971119] WARNING: CPU: 0 PID: 8 at mm/vmalloc.c:3361 vfree+0x1ac/0x2c4 [ 1404.978146] Trying to vfree() nonexistent vm area (74cc6c73) [ 1404.983901] Modules linked in: mtd_rw(O) ath9k(O) ath9k_common(O)... [ 1405.043696] CPU: 0 UID: 0 PID: 8 Comm: kworker/0:1 Tainted: G W O 6.12.25 #0 [ 1405.052118] Tainted: [W]=WARN, [O]=OOT_MODULE [ 1405.056536] Hardware name: [ 1405.061222] Workqueue: events do_free_init [ 1405.065408] Stack : 807865d8 80850000 81823f80 81857df8 00000000 00000d21 81823fd0 800ca130 [ 1405.073924] 81839e48 807865d8 808d20bf 807865d8 81857d1c 00000001 81857ce8 4951640f [ 1405.082434] 00000000 00000000 807865d8 81857bf8 ffffefff 00000000 ffffffea 00000b5d [ 1405.090944] 81857c04 00000b5d 808537b0 ffffffff 00000001 00000000 807865d8 81857df8 [ 1405.099453] 00000000 00000d21 81823fd0 8085119c 00000018 803f4828 00000000 80a00000 [ 1405.107963] ... [ 1405.110454] Call Trace: [ 1405.112935] [<80066910>] show_stack+0x28/0xf0 [ 1405.117392] [<8069f340>] dump_stack_lvl+0x48/0x7c [ 1405.122186] [<80084ab8>] __warn+0x9c/0x118 [ 1405.126357] [<80084bc0>] warn_slowpath_fmt+0x8c/0xac [ 1405.131399] [<801f02ec>] vfree+0x1ac/0x2c4 [ 1405.135570] [<800dde54>] do_free_init+0x50/0x84 [ 1405.140172] [<8009f4a0>] process_one_work+0x1b0/0x3dc [ 1405.145312] [<800a022c>] worker_thread+0x308/0x478 [ 1405.150178] [<800a81c0>] kthread+0xf4/0x11c [ 1405.154455] [<80061b58>] ret_from_kernel_thread+0x14/0x1c [ 1405.159938] [ 1405.161772] ---[ end trace 0000000000000000 ]--- Fixes: a9c0f28951fd ("generic: 6.12: move MIPS reloc patch from pending to hack and rework") Ref: https://lore.kernel.org/all/20240505160628.2323363-1-rppt@kernel.org/ Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Tested-by: Tony Ambardar <itugrok@yahoo.com> Link: https://github.com/openwrt/openwrt/pull/18721 Signed-off-by: Robert Marko <robimarko@gmail.com>