openwrt-6.x/target/linux/generic/hack-6.12
Shiji Yang be7ab6893a generic: fix MIPS -mno-long-calls patchset for 6.12 kernel
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: a9c0f28951 ("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>
2025-05-06 12:48:21 +02:00
..
200-tools_portability.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
204-module_strip.patch kernel: bump 6.12 to 6.12.26 2025-05-04 21:58:23 +02:00
205-kconfig-abort-configuration-on-unset-symbol.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
210-darwin_scripts_include.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
211-darwin-uuid-typedef-clash.patch
214-spidev_h_portability.patch
230-openwrt_lzma_options.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
250-netfilter_depends.patch
251-kconfig.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
253-ksmbd-config.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
259-regmap_dynamic.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
260-crypto_test_dependencies.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
261-lib-arc4-unhide.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
280-rfkill-stubs.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
300-MIPS-r4k_cache-use-more-efficient-cache-blast.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
301-01-mm-permit-to-declare-custom-execmem-alloc-free-funct.patch generic: fix MIPS -mno-long-calls patchset for 6.12 kernel 2025-05-06 12:48:21 +02:00
301-02-mips-replace-mlong-calls-with-mno-long-calls-if-poss.patch generic: fix MIPS -mno-long-calls patchset for 6.12 kernel 2025-05-06 12:48:21 +02:00
402-mtd-blktrans-call-add-disks-after-mtd-device.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
420-mtd-support-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
421-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
430-mtk-bmt-support.patch
600-net-enable-fraglist-GRO-by-default.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
610-net-page_pool-try-to-free-deferred-skbs-while-waitin.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
645-netfilter-connmark-introduce-set-dscpmark.patch
650-netfilter-add-xt_FLOWOFFLOAD-target.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
651-wireless_mesh_header.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
660-fq_codel_defaults.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
661-kernel-ct-size-the-hashtable-more-adequately.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
700-swconfig_switch_drivers.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
711-net-dsa-mv88e6xxx-disable-ATU-violation.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
721-net-add-packet-mangeling.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
722-net-phy-aquantia-enable-AQR112-and-AQR412.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
723-net-phy-aquantia-fix-system-side-protocol-mi.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch kernel: bump 6.12 to 6.12.26 2025-05-04 21:58:23 +02:00
735-net-phy-realtek-rtl8261n.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
750-net-pcs-mtk-lynxi-workaround-2500BaseX-no-an.patch
760-net-usb-r8152-add-LED-configuration-from-OF.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
761-dt-bindings-net-add-RTL8152-binding-documentation.patch
766-net-phy-mediatek-ge-add-LED-configuration-interface.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
773-bgmac-add-srab-switch.patch
780-usb-net-MeigLink_modem_support.patch kernel: bump 6.12 to 6.12.26 2025-05-04 21:58:23 +02:00
781-usb-net-rndis-support-asr.patch
800-GPIO-add-named-gpio-exports.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
810-bcma-ssb-fallback-sprom.patch
901-debloat_sock_diag.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
902-debloat_proc.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
904-debloat_dma_buf.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
910-kobject_uevent.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
911-kobject_add_broadcast_uevent.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00
920-device_tree_cmdline.patch generic: 6.12: refresh hack patches 2025-04-30 16:26:34 +02:00
930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch generic: 6.12: manually rebuild hack patches 2025-04-30 16:26:33 +02:00