[PATCH 2/2] ath79: mikrotik: Change the moment of routerboot partition parser init

Denis K denis281089 at gmail.com
Mon Nov 15 05:39:57 PST 2021


I've tested it (on 5.4 and 5.10). On reboot I've had this kernel panic:

[ 1028.460043] Reserved instruction in kernel code[#1]:
[ 1028.465191] CPU: 0 PID: 2406 Comm: procd Not tainted 5.4.158 #0
[ 1028.471300] $ 0   : 00000000 00000001 00000000 00000000
[ 1028.476702] $ 4   : 8342118c 806adf50 00000000 00000000
[ 1028.482095] $ 8   : 83812ab0 00000000 83812ad4 00000002
[ 1028.487490] $12   : fffffffd 00000402 80731904 00000040
[ 1028.492883] $16   : 8073503c 83419000 807318ec 80730000
[ 1028.498278] $20   : 80730000 808a0000 806a9efc 806a9eec
[ 1028.503671] $24   : 00000000 00000000
[ 1028.509065] $28   : 83c42000 83c43b80 83cefc00 803c1fd0
[ 1028.514459] Hi    : 00474bff
[ 1028.517426] Lo    : b47b3346
[ 1028.520400] epc   : 80764000 0x80764000
[ 1028.524371] ra    : 803c1fd0 del_mtd_device+0x68/0x100
[ 1028.529673] Status: 1100dc03    KERNEL EXL IE
[ 1028.533994] Cause : 00800028 (ExcCode 0a)
[ 1028.538135] PrId  : 0001974c (MIPS 74Kc)
[ 1028.542181] Modules linked in: ath9k ath9k_common pppoe ppp_async
iptable_nat ath9k_hw ath xt_state xt_nat xt_conntrack xt_REDIRECT
xt_MASQUERADE xt_FLOWOFFLOAD pppox ppp_generic nf_nat nf_flow_table_hw
nf_flow_table nf_conntrack mac80211 ipt_REJECT cfg80211 xt_time
xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS
xt_LOG slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4
iptable_mangle iptable_filter ip_tables crc_ccitt compat evdev
input_core nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter
ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 sha256_generic
libsha256 seqiv jitterentropy_rng drbg hmac ghash_generic gf128mul gcm
ctr cmac ccm fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd
gpio_button_hotplug usbcore nls_base usb_common aead cryptomgr
crypto_null crypto_hash
[ 1028.615764] Process procd (pid: 2406, threadinfo=2c3273bc,
task=f31e3962, tls=77ef0dcc)
[ 1028.624021] Stack : 00000000 802183b4 80680000 8066ecb0 80731768
83419000 80731978 00000000
[ 1028.632649]         80730000 803c4a5c 80730000 00000001 83c09400
802150e8 000b0054 83418400
[ 1028.641278]         83ff4000 80731978 00000000 803c4a1c 83ff1360
00000000 00000001 808a0000
[ 1028.649906]         83ff1360 80731768 83d99880 80731978 00000000
803c63a4 806a9efc 806a9eec
[ 1028.658535]         83cefc00 83d01d40 83d99880 80733b18 00000000
80733b18 00000044 803c2248
[ 1028.667163]         ...
[ 1028.669683] Call Trace:
[ 1028.669685]
[ 1028.673757] [<802183b4>] sysfs_remove_files+0x38/0x5c
[ 1028.679019] [<803c4a5c>] __mtd_del_partition+0xa8/0x100
[ 1028.684439] [<802150e8>] __kernfs_remove.part.0+0x1e4/0x318
[ 1028.690204] [<803c4a1c>] __mtd_del_partition+0x68/0x100
[ 1028.695604] [<803c63a4>] del_mtd_partitions+0x78/0xf0
[ 1028.700826] [<803c2248>] mtd_device_unregister+0x28/0x5c
[ 1028.706314] [<803a1c80>] __device_release_driver+0x178/0x214
[ 1028.712159] [<8039fdf0>] klist_devices_put+0x0/0x8
[ 1028.717105] [<803a1d48>] device_release_driver+0x2c/0x44
[ 1028.722589] [<803a0f68>] bus_remove_device+0x154/0x168
[ 1028.727905] [<803b7944>] __unregister+0x0/0x20
[ 1028.732522] [<8039cd80>] device_del+0x15c/0x458
[ 1028.737228] [<803428e0>] spi_sync_transfer.constprop.0+0x60/0x6c
[ 1028.743438] [<803b7348>] spi_complete+0x0/0x8
[ 1028.747936] [<803b7944>] __unregister+0x0/0x20
[ 1028.752524] [<803b7910>] spi_unregister_device+0x40/0x74
[ 1028.758007] [<803b7954>] __unregister+0x10/0x20
[ 1028.762685] [<803b7944>] __unregister+0x0/0x20
[ 1028.767277] [<8039bd78>] device_for_each_child+0x50/0xa4
[ 1028.772778] [<803b903c>] spi_unregister_controller+0x3c/0x170
[ 1028.778724] [<803bdb90>] ath79_spi_remove+0x1c/0x78
[ 1028.783766] [<8039f658>] device_shutdown+0x13c/0x1f4
[ 1028.788897] [<800a4814>] blocking_notifier_call_chain+0x74/0xe8
[ 1028.795019] [<800a5d6c>] kernel_restart+0x40/0xac
[ 1028.799877] [<800a5ed8>] __do_sys_reboot+0x100/0x214
[ 1028.805037] [<8012fdc8>] filemap_map_pages+0x3a0/0x3d0
[ 1028.810352] [<801617e4>] handle_mm_fault+0x89c/0xcf0
[ 1028.815520] [<8006fdec>] do_page_fault+0xb4/0x4b8
[ 1028.820379] [<8006e18c>] syscall_common+0x34/0x58
[ 1028.825233]
[ 1028.826769] Code: 00000000  00000000  00000000 <7f454c46> 01020100
00000000  00000000  00030008  00000001
[ 1028.836839]
[ 1028.838458] ---[ end trace 37f524f87b727ac2 ]---
[ 1028.843240] Kernel panic - not syncing: Fatal exception
[ 1028.848639] Rebooting in 3 seconds..

If I comment out calls of rb_hardconfig_exit and rb_softconfig_exit in
routerboot_mtd_notifier_remove, there is no panic. I'm trying to
determine why this is happening.

Regards, Denis



More information about the openwrt-devel mailing list