Thread View: linux.kernel.netdev
2 messages
2 total messages
Started by Andreas Haerter
Fri, 06 Nov 2026 05:45
Re: [PATCH net v6 2/4] net: wwan: t7xx: do not exit the TX push kthread on resume failure
Author: Andreas Haerter
Date: Fri, 06 Nov 2026 05:45
Date: Fri, 06 Nov 2026 05:45
55 lines
9948 bytes
9948 bytes
On Fri, Oct 02, 2026 at 09:46:36AM +0800, Tim JH Chen wrote: > A later > t7xx_dpmaif_tx_thread_rel() then calls kthread_stop() on the stale > pointer [...] I hit this in normal use on a ThinkPad X13 Gen 6 with a Rolling RW350R-GL (14c3:4d75, subsystem 2099:3552), on Fedora's 7.2.4 and 7.2.5. A runtime suspend failed with "[PM] SAP suspend error: -110". After that, every MBIM write failed with -22 and the modem stayed dead. Writing to the PCI remove attribute then gave a WARNING at kernel/kthread.c:84 and, on a later occurrence, this oops: BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor write access in kernel mode RIP: 0010:kthread_stop+0x44/0x180 Call Trace: t7xx_dpmaif_hif_exit+0x46/0xa0 [mtk_t7xx] t7xx_md_exit+0x5c/0xa0 [mtk_t7xx] t7xx_pci_remove+0x41/0xc0 [mtk_t7xx] pci_device_remove+0x4a/0xb0 device_release_driver_internal+0x19e/0x200 pci_stop_bus_device+0x80/0xa0 pci_stop_and_remove_bus_device_locked+0x1a/0x30 remove_store+0x83/0xa0 The faulting instruction is the set_bit of KTHREAD_SHOULD_STOP with worker_private NULL, so the pointer no longer referred to a kthread. The writing process stayed in D state holding pci_rescan_remove_lock. Shutdown then hung and the machine needed a forced power-off, which may be worth a line in the changelog. One question on the retry. In my case the failure is permanent: runtime_error is latched, so rpm_resume() returns -EINVAL from then on. With this patch the crash goes away, but TX stays dead and the thread retries every 20 ms for as long as the TX lists are non-empty. Is that the intended end state, or should something report the dead data path? I have no reproducer, so I cannot offer a Tested-by. Thanks, Andreas -- foundata GmbH Steinhäuserstr. 20 76135 Karlsruhe Web: https://foundata.com Sitz der Gesellschaft: Karlsruhe Registergericht: Amtsgericht Mannheim, HRB 714807 Geschäftsführung: Andreas Haerter USt-IdNr.: DE284122682
Re: [PATCH net v6 2/4] net: wwan: t7xx: do not exit the TX push kthread on resume failure
Author: Tim JH Chen
Date: Fri, 20 Nov 2026 02:32
Date: Fri, 20 Nov 2026 02:32
35 lines
12829 bytes
12829 bytes
Hi Andreas, Thanks for the report. The trace matches the sequence described in the commit message: pm_runtime_resume_and_get() returned -EINVAL after the runtime suspend failure left dev->power.runtime_error set, the thread returned, and kthread_stop() in t7xx_dpmaif_tx_thread_rel() later ran on the stale task pointer. The fix is v7 patch 4/6: https://lore.kernel.org/netdev/20261120015556.131547-5-tim770802@gmail.com/ Its commit message now describes your case, including the remove that hung in D state holding pci_rescan_remove_lock, and carries a Reported-by: and Closes: for your mail. If you would rather not be credited, tell me and I will drop the tag in the next revision. > One question on the retry. In my case the failure is permanent: > runtime_error is latched, so rpm_resume() returns -EINVAL from then on. > With this patch the crash goes away, but TX stays dead and the thread > retries every 20 ms for as long as the TX lists are non-empty. Is that > the intended end state, or should something report the dead data path? The intent of this patch is only that the thread stays alive until teardown so kthread_stop() is safe; it does not try to recover the data path. A latched runtime_error is not cleared by anything in the driver today, and recovering from a failed runtime suspend is a separate problem from this fix. You are right that polling every 20 ms for as long as the lists are non-empty is not a good steady state. In v7 the thread retries once per second instead, and the first failure of a streak is logged, so the dead data path is reported once rather than silently. It still does not recover the data path from a latched runtime_error. Thanks, Tim
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads