Download raw body.
bwfm: don't wait in interrupt context
With cludwig's recent pool_get() check fix I am seeing splassert
warnings in my dmesg.
The full error is:
splassert: assertwaitok: want -1 have 1
Starting stack trace...
assertwaitok() at pool_get+0x34
pool_get() at m_clget+0x19c
m_clget() at m_dup_pkt+0x168
m_dup_pkt() at bwfm_rx+0x4c
bwfm_rx() at bwfm_pci_msg_rx+0x3ac
bwfm_pci_msg_rx() at bwfm_pci_ring_rx+0xb0
bwfm_pci_ring_rx() at bwfm_pci_intr+0x18c
bwfm_pci_intr() at aplintc_irq_handler+0x170
aplintc_irq_handler() at arm_cpu_irq+0x44
arm_cpu_irq() at handle_el1h_irq+0x68
handle_el1h_irq() at cpu_idle_cycle+0x28
--- interrupt ---
cpu_idle_cycle() at sched_idle+0x1f4
sched_idle() at proc_trampoline+0xc
End of stack trace.
This is caused by a WAITOK in interrupt context. We already
handle m_dup_pkt() returning NULL so just turn it into a M_DONTWAIT.
ok?
Index: dev/ic/bwfm.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/bwfm.c,v
retrieving revision 1.111
diff -u -p -r1.111 bwfm.c
--- dev/ic/bwfm.c 19 Feb 2024 21:23:02 -0000 1.111
+++ dev/ic/bwfm.c 2 Aug 2025 10:51:11 -0000
@@ -2352,7 +2352,7 @@ bwfm_rx(struct bwfm_softc *sc, struct mb
/* Remaining data is an ethernet packet, so align. */
if ((mtod(m, paddr_t) & 0x3) != ETHER_ALIGN) {
struct mbuf *m0;
- m0 = m_dup_pkt(m, ETHER_ALIGN, M_WAITOK);
+ m0 = m_dup_pkt(m, ETHER_ALIGN, M_DONTWAIT);
m_freem(m);
if (m0 == NULL) {
ifp->if_ierrors++;
bwfm: don't wait in interrupt context