@Ansuel
I don't know if the following info could be useful about the CPU scheduling reboot problem or it is ksmbd only issue in this case.
Today I've connected SSD USB3 disk to the router USB3 port and used it as a network attached storage drive with ksmbd.
The device could transfer (read and write) with speed of over 70MBps and even more but the CPU was at almost 100% (both cores).
This quickly gave several reboots although most of the time I've transferred successfully big files with exFAT and F2FS file systems.
Here are the pstore files
Panic#2 Part1
<6>[ 289.839172] usb 4-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
<6>[ 289.886394] scsi host1: uas
<5>[ 289.893928] scsi 1:0:0:0: Direct-Access StoreJet 0 PQ: 0 ANSI: 6
<5>[ 289.895406] sd 1:0:0:0: [sda] 937703088 512-byte logical blocks: (480 GB/447 GiB)
<5>[ 289.901498] sd 1:0:0:0: [sda] Write Protect is off
<7>[ 289.908635] sd 1:0:0:0: [sda] Mode Sense: 43 00 00 00
<5>[ 289.913475] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
<6>[ 289.918827] sd 1:0:0:0: [sda] Optimal transfer size 33553920 bytes
<6>[ 289.928838] sda: sda1
<5>[ 289.934902] sd 1:0:0:0: [sda] Attached SCSI disk
<1>[ 1575.662907] 8<--- cut here ---
<1>[ 1575.662933] Unable to handle kernel NULL pointer dereference at virtual address 0000000c
<1>[ 1575.665005] pgd = 8a3a5825
<1>[ 1575.673162] [0000000c] *pgd=00000000
<0>[ 1575.675616] Internal error: Oops: 17 [#1] SMP ARM
<4>[ 1575.679345] Modules linked in: ksmbd asn1_decoder ecm nft_fib_inet nf_flow_table_ipv6 nf_flow_table_ipv4 nf_flow_table_inet ath10k_pci ath10k_core ath wireguard nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_counter nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack_netlink nf_conntrack mac80211 libchacha20poly1305 curve25519_neon cfg80211 ppp_async poly1305_arm nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_ipv6 nf_log_ipv4 nf_log_common nf_defrag_ipv6 nf_defrag_ipv4 libcurve25519_generic libcrc32c crc_ccitt compat chacha_neon fuse qca_nss_qdisc qca_nss_pppoe pppoe pppox ppp_generic slhc ledtrig_usbport cryptodev nfsv4 nfsv3 nfs nfs_ssc msdos bonding ip6_udp_tunnel udp_tunnel sit qca_nss_drv qca_nss_gmac oid_registry tunnel4 ip_tunnel xfrm_user xfrm_ipcomp af_key xfrm_algo lockd sunrpc grace hfsplus hfs cdrom dns_resolver
<4>[ 1575.679660] nls_utf8 nls_iso8859_15 nls_iso8859_1 nls_cp850 nls_cp437 nls_cp1250 wp512 twofish_generic twofish_common tgr192 tea serpent_generic khazad cast6_generic cast5_generic cast_common camellia_generic blowfish_generic blowfish_common anubis xts crypto_user algif_skcipher algif_rng algif_hash algif_aead af_alg sha512_generic sha1_generic seqiv md5 md4 echainiv ecb des_generic libdes cmac authencesn authenc uas usb_storage leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom ohci_platform ohci_hcd phy_qcom_ipq806x_usb ahci fsl_mph_dr_of ehci_platform ehci_fsl sd_mod ahci_platform libahci_platform libahci libata scsi_mod ehci_hcd ramoops reed_solomon pstore gpio_button_hotplug vfat fat f2fs ext4 mbcache jbd2 exfat dm_mirror dm_region_hash dm_log dm_crypt dm_mod dax crc32c_generic crc32_generic cbc encrypted_keys trusted tpm
<4>[ 1575.822832] CPU: 1 PID: 7318 Comm: kworker/1:103 Not tainted 5.10.139 #0
<4>[ 1575.845059] Hardware name: Generic DT based system
<4>[ 1575.851870] Workqueue: ksmbd-io handle_ksmbd_work [ksmbd]
<4>[ 1575.856437] PC is at idr_remove+0x0/0x10
<4>[ 1575.861913] LR is at session_fd_check+0x3b4/0x6e8 [ksmbd]
<4>[ 1575.865892] pc : [<c0633544>] lr : [<bf982190>] psr: 40000013
<4>[ 1575.871187] sp : cd347e88 ip : dd047720 fp : 00000000
<4>[ 1575.877261] r10: bf9bb240 r9 : 9156cbcd r8 : bf9bb27c
<4>[ 1575.882471] r7 : c311ff00 r6 : 00000000 r5 : c311ff00 r4 : c4f799d4
<4>[ 1575.887681] r3 : 80000000 r2 : 00000000 r1 : 00000077 r0 : 00000000
<4>[ 1575.894279] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
<4>[ 1575.900795] Control: 10c5787d Table: 477c006a DAC: 00000051
<0>[ 1575.907996] Process kworker/1:103 (pid: 7318, stack limit = 0xebad35c3)
<0>[ 1575.913723] Stack: (0xcd347e88 to 0xcd348000)
<0>[ 1575.920154] 7e80: c4b79240 00000000 ced51a04 c311ff00 bf9bb27c 9156cbcd
<0>[ 1575.924676] 7ea0: bf9bb27c bf982498 c4b79240 bf99a7b4 00000128 00000000 c4b79240 c0645d48
<0>[ 1575.932833] 7ec0: c4f7995c 00000001 00010000 dc4a7850 00000000 00000000 c4b792a4 d0bed400
<0>[ 1575.940991] 7ee0: c4b79240 c4b792a4 bf9ba8bc 00000044 00000011 bf9bb27c bf9b2df8 bf984b80
<0>[ 1575.949153] 7f00: c0c46d80 bf9b2dcc cd347f44 c4b792a4 c274ab00 dd99f980 ff7f6f00 00000000
<0>[ 1575.957313] 7f20: 00000040 00000000 cd346000 c0338940 00000008 dd99f998 c274ab00 c274ab14
<0>[ 1575.965472] 7f40: dd99f980 00000008 dd99f998 c0d03d00 dd99fb40 c0338c28 c0d9bab8 c0d0c168
<0>[ 1575.973633] 7f60: c274ab00 c26dd240 c7764380 00000000 cd346000 c0338bb4 c274ab00 cd345ec4
<0>[ 1575.981792] 7f80: c26dd264 c033eb0c 00000000 c7764380 c033e9b0 00000000 00000000 00000000
<0>[ 1575.989952] 7fa0: 00000000 00000000 00000000 c0300148 00000000 00000000 00000000 00000000
<0>[ 1575.998110] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<0>[ 1576.006269] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
<0>[ 1576.014463] [<c0633544>] (idr_remove) from [<bf982190>] (session_fd_check+0x3b4/0x6e8 [ksmbd])
<0>[ 1576.022654] [<bf982190>] (session_fd_check [ksmbd]) from [<bf982498>] (session_fd_check+0x6bc/0x6e8 [ksmbd])
<0>[ 1576.031122] [<bf982498>] (session_fd_check [ksmbd]) from [<bf99a7b4>] (smb2_set_info+0x190/0xf14 [ksmbd])
<0>[ 1576.041110] [<bf99a7b4>] (smb2_set_info [ksmbd]) from [<bf984b80>] (handle_ksmbd_work+0x198/0x49c [ksmbd])
<0>[ 1576.050562] [<bf984b80>] (handle_ksmbd_work [ksmbd]) from [<c0338940>] (process_one_work+0x1fc/0x470)
<0>[ 1576.060086] [<c0338940>] (process_one_work) from [<c0338c28>] (worker_thread+0x74/0x5d4)
<0>[ 1576.069375] [<c0338c28>] (worker_thread) from [<c033eb0c>] (kthread+0x15c/0x160)
<0>[ 1576.077532] [<c033eb0c>] (kthread) from [<c0300148>] (ret_from_fork+0x14/0x2c)
<0>[ 1576.084905] Exception stack(0xcd347fb0 to 0xcd347ff8)
<0>[ 1576.091940] 7fa0: 00000000 00000000 00000000 00000000
<0>[ 1576.097067] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<0>[ 1576.105227] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
<0>[ 1576.113385] Code: e1a00005 e58d600c ebffff75 eaffffe9 (e590300c)
<4>[ 1576.119953] ---[ end trace 1af3b11863bca57f ]---
<0>[ 1576.132592] Kernel panic - not syncing: Fatal exception
<2>[ 1576.132619] CPU0: stopping
<4>[ 1576.136612] CPU: 0 PID: 7239 Comm: ksmbd:1727 Tainted: G D 5.10.139 #0
<4>[ 1576.139392] Hardware name: Generic DT based system
<4>[ 1576.147299] [<c030e46c>] (unwind_backtrace) from [<c030a204>] (show_stack+0x14/0x20)
<4>[ 1576.151985] [<c030a204>] (show_stack) from [<c062ef48>] (dump_stack+0x94/0xa8)
<4>[ 1576.159884] [<c062ef48>] (dump_stack) from [<c030d190>] (do_handle_IPI+0x140/0x184)
<4>[ 1576.166913] [<c030d190>] (do_handle_IPI) from [<c030d1f0>] (ipi_handler+0x1c/0x2c)
<4>[ 1576.174468] [<c030d1f0>] (ipi_handler) from [<c037174c>] (__handle_domain_irq+0x90/0xf4)
<4>[ 1576.182111] [<c037174c>] (__handle_domain_irq) from [<c06482e0>] (gic_handle_irq+0x90/0xb8)
<4>[ 1576.190355] [<c06482e0>] (gic_handle_irq) from [<c0300b8c>] (__irq_svc+0x6c/0x90)
<4>[ 1576.198421] Exception stack(0xcbc69e98 to 0xcbc69ee0)
<4>[ 1576.206059] 9e80: 00000000 cbc68000
<4>[ 1576.211104] 9ea0: 1cd4a000 00005213 ca5305c0 dd990d80 ffffe000 ca5305c0 c0c46d80 bf9b2c3c
<4>[ 1576.219264] 9ec0: ca530954 cbc69f1c 00000000 cbc69ee8 c09c60cc c09c63f8 60000013 ffffffff
<4>[ 1576.227421] [<c0300b8c>] (__irq_svc) from [<c09c63f8>] (__schedule+0x434/0x508)
<4>[ 1576.235575] [<c09c63f8>] (__schedule) from [<c09c6534>] (schedule+0x68/0x110)
<4>[ 1576.242696] [<c09c6534>] (schedule) from [<c09ca104>] (schedule_timeout+0x74/0xd8)
<4>[ 1576.250012] [<c09ca104>] (schedule_timeout) from [<bf983bd4>] (ksmbd_conn_handler_loop+0x130/0x268 [ksmbd])
<4>[ 1576.257471] [<bf983bd4>] (ksmbd_conn_handler_loop [ksmbd]) from [<c033eb0c>] (kthread+0x15c/0x160)
<4>[ 1576.267088] [<c033eb0c>] (kthread) from [<c0300148>] (ret_from_fork+0x14/0x2c)
<4>[ 1576.276110] Exception stack(0xcbc69fb0 to 0xcbc69ff8)
<4>[ 1576.283317] 9fa0: 00000000 00000000 00000000 00000000
<4>[ 1576.288447] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<4>[ 1576.296604] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
Oops#1 Part1
<6>[ 289.839172] usb 4-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
<6>[ 289.886394] scsi host1: uas
<5>[ 289.893928] scsi 1:0:0:0: Direct-Access StoreJet 0 PQ: 0 ANSI: 6
<5>[ 289.895406] sd 1:0:0:0: [sda] 937703088 512-byte logical blocks: (480 GB/447 GiB)
<5>[ 289.901498] sd 1:0:0:0: [sda] Write Protect is off
<7>[ 289.908635] sd 1:0:0:0: [sda] Mode Sense: 43 00 00 00
<5>[ 289.913475] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
<6>[ 289.918827] sd 1:0:0:0: [sda] Optimal transfer size 33553920 bytes
<6>[ 289.928838] sda: sda1
<5>[ 289.934902] sd 1:0:0:0: [sda] Attached SCSI disk
<1>[ 1575.662907] 8<--- cut here ---
<1>[ 1575.662933] Unable to handle kernel NULL pointer dereference at virtual address 0000000c
<1>[ 1575.665005] pgd = 8a3a5825
<1>[ 1575.673162] [0000000c] *pgd=00000000
<0>[ 1575.675616] Internal error: Oops: 17 [#1] SMP ARM
<4>[ 1575.679345] Modules linked in: ksmbd asn1_decoder ecm nft_fib_inet nf_flow_table_ipv6 nf_flow_table_ipv4 nf_flow_table_inet ath10k_pci ath10k_core ath wireguard nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_counter nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack_netlink nf_conntrack mac80211 libchacha20poly1305 curve25519_neon cfg80211 ppp_async poly1305_arm nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_ipv6 nf_log_ipv4 nf_log_common nf_defrag_ipv6 nf_defrag_ipv4 libcurve25519_generic libcrc32c crc_ccitt compat chacha_neon fuse qca_nss_qdisc qca_nss_pppoe pppoe pppox ppp_generic slhc ledtrig_usbport cryptodev nfsv4 nfsv3 nfs nfs_ssc msdos bonding ip6_udp_tunnel udp_tunnel sit qca_nss_drv qca_nss_gmac oid_registry tunnel4 ip_tunnel xfrm_user xfrm_ipcomp af_key xfrm_algo lockd sunrpc grace hfsplus hfs cdrom dns_resolver
<4>[ 1575.679660] nls_utf8 nls_iso8859_15 nls_iso8859_1 nls_cp850 nls_cp437 nls_cp1250 wp512 twofish_generic twofish_common tgr192 tea serpent_generic khazad cast6_generic cast5_generic cast_common camellia_generic blowfish_generic blowfish_common anubis xts crypto_user algif_skcipher algif_rng algif_hash algif_aead af_alg sha512_generic sha1_generic seqiv md5 md4 echainiv ecb des_generic libdes cmac authencesn authenc uas usb_storage leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom ohci_platform ohci_hcd phy_qcom_ipq806x_usb ahci fsl_mph_dr_of ehci_platform ehci_fsl sd_mod ahci_platform libahci_platform libahci libata scsi_mod ehci_hcd ramoops reed_solomon pstore gpio_button_hotplug vfat fat f2fs ext4 mbcache jbd2 exfat dm_mirror dm_region_hash dm_log dm_crypt dm_mod dax crc32c_generic crc32_generic cbc encrypted_keys trusted tpm
<4>[ 1575.822832] CPU: 1 PID: 7318 Comm: kworker/1:103 Not tainted 5.10.139 #0
<4>[ 1575.845059] Hardware name: Generic DT based system
<4>[ 1575.851870] Workqueue: ksmbd-io handle_ksmbd_work [ksmbd]
<4>[ 1575.856437] PC is at idr_remove+0x0/0x10
<4>[ 1575.861913] LR is at session_fd_check+0x3b4/0x6e8 [ksmbd]
<4>[ 1575.865892] pc : [<c0633544>] lr : [<bf982190>] psr: 40000013
<4>[ 1575.871187] sp : cd347e88 ip : dd047720 fp : 00000000
<4>[ 1575.877261] r10: bf9bb240 r9 : 9156cbcd r8 : bf9bb27c
<4>[ 1575.882471] r7 : c311ff00 r6 : 00000000 r5 : c311ff00 r4 : c4f799d4
<4>[ 1575.887681] r3 : 80000000 r2 : 00000000 r1 : 00000077 r0 : 00000000
<4>[ 1575.894279] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
<4>[ 1575.900795] Control: 10c5787d Table: 477c006a DAC: 00000051
<0>[ 1575.907996] Process kworker/1:103 (pid: 7318, stack limit = 0xebad35c3)
<0>[ 1575.913723] Stack: (0xcd347e88 to 0xcd348000)
<0>[ 1575.920154] 7e80: c4b79240 00000000 ced51a04 c311ff00 bf9bb27c 9156cbcd
<0>[ 1575.924676] 7ea0: bf9bb27c bf982498 c4b79240 bf99a7b4 00000128 00000000 c4b79240 c0645d48
<0>[ 1575.932833] 7ec0: c4f7995c 00000001 00010000 dc4a7850 00000000 00000000 c4b792a4 d0bed400
<0>[ 1575.940991] 7ee0: c4b79240 c4b792a4 bf9ba8bc 00000044 00000011 bf9bb27c bf9b2df8 bf984b80
<0>[ 1575.949153] 7f00: c0c46d80 bf9b2dcc cd347f44 c4b792a4 c274ab00 dd99f980 ff7f6f00 00000000
<0>[ 1575.957313] 7f20: 00000040 00000000 cd346000 c0338940 00000008 dd99f998 c274ab00 c274ab14
<0>[ 1575.965472] 7f40: dd99f980 00000008 dd99f998 c0d03d00 dd99fb40 c0338c28 c0d9bab8 c0d0c168
<0>[ 1575.973633] 7f60: c274ab00 c26dd240 c7764380 00000000 cd346000 c0338bb4 c274ab00 cd345ec4
<0>[ 1575.981792] 7f80: c26dd264 c033eb0c 00000000 c7764380 c033e9b0 00000000 00000000 00000000
<0>[ 1575.989952] 7fa0: 00000000 00000000 00000000 c0300148 00000000 00000000 00000000 00000000
<0>[ 1575.998110] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<0>[ 1576.006269] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
<0>[ 1576.014463] [<c0633544>] (idr_remove) from [<bf982190>] (session_fd_check+0x3b4/0x6e8 [ksmbd])
<0>[ 1576.022654] [<bf982190>] (session_fd_check [ksmbd]) from [<bf982498>] (session_fd_check+0x6bc/0x6e8 [ksmbd])
<0>[ 1576.031122] [<bf982498>] (session_fd_check [ksmbd]) from [<bf99a7b4>] (smb2_set_info+0x190/0xf14 [ksmbd])
<0>[ 1576.041110] [<bf99a7b4>] (smb2_set_info [ksmbd]) from [<bf984b80>] (handle_ksmbd_work+0x198/0x49c [ksmbd])
<0>[ 1576.050562] [<bf984b80>] (handle_ksmbd_work [ksmbd]) from [<c0338940>] (process_one_work+0x1fc/0x470)
<0>[ 1576.060086] [<c0338940>] (process_one_work) from [<c0338c28>] (worker_thread+0x74/0x5d4)
<0>[ 1576.069375] [<c0338c28>] (worker_thread) from [<c033eb0c>] (kthread+0x15c/0x160)
<0>[ 1576.077532] [<c033eb0c>] (kthread) from [<c0300148>] (ret_from_fork+0x14/0x2c)
<0>[ 1576.084905] Exception stack(0xcd347fb0 to 0xcd347ff8)
<0>[ 1576.091940] 7fa0: 00000000 00000000 00000000 00000000
<0>[ 1576.097067] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<0>[ 1576.105227] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
<0>[ 1576.113385] Code: e1a00005 e58d600c ebffff75 eaffffe9 (e590300c)
<4>[ 1576.119953] ---[ end trace 1af3b11863bca57f ]---