NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/56235: ti driver creates DMA maps in interrupt context



>Number:         56235
>Category:       kern
>Synopsis:       ti driver creates DMA maps in interrupt context
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 05 14:40:00 +0000 2021
>Originator:     Jason Thorpe
>Release:        NetBSD 9.99.83
>Organization:
RISCy Business
>Environment:
NetBSD  9.99.83 NetBSD 9.99.83 (GENERIC) #1: Sat Jun  5 07:08:09 PDT 2021  thorpej@the-ripe-vessel:/space/src/sys/arch/cobalt/compile/GENERIC cobalt
>Description:
The ti driver creates DMA maps from interrupt context.  This is not safe to do; it needs to create them from thread context so that they're available in interrupt context.

cobalt# ifconfig ti0 up
[  87.3500146] panic: kernel diagnostic assertion "(!cpu_intr_p() && !cpu_softintr_p())" failed: file "../../../../kern/subr_kmem.c", line 322 kmem(9) should not be used from the interrupt context
[  87.3681102] cpu0: Begin traceback...
[  87.3718216] pid -1886929592 not found
[  87.3718216] cpu0: End traceback...
[  87.3718216] kernel: breakpoint trap
Stopped in pid 631.631 (mdnsd) at       netbsd:cpu_Debugger+0x4:        jr      
ra
                bdslot: nop
db> trace
0x8f87bd70: cpu_Debugger+0x4 (0x3,0x8000,0xc,0x805f2d00) ra 0x80353384 sz 0
0x8f87bd70: vpanic+0x144 (0x3,0x8000,0xc,0x805f2d00) ra 0x804744d8 sz 48
0x8f87bda0: kern_assert+0x38 (0x3,0x805104b8,0x80561b3c,0x80561a4c) ra 0x8034743
c sz 32
0x8f87bdc0: kmem_zalloc+0x4c (0x3,0x805104b8,0x80561b3c,0x80561a4c) ra 0x8000ea9
4 sz 48
0x8f87bdf0: _bus_dmamap_create+0x54 (0x3,0x805104b8,0x80561b3c,0x80561a4c) ra 0x
8004ef3c sz 72
0x8f87be38: ti_newbuf_std+0x12c (0x3,0x805104b8,0x80561b3c,0) ra 0x800528dc sz 5
6
0x8f87be70: ti_intr+0x45c (0x3,0x805104b8,0x80561b3c,0) ra 0x8000bb80 sz 96
0x8f87bed0: icu_intr+0xfc (0x3,0x805104b8,0x80561b3c,0) ra 0x8000c55c sz 64
0x8f87bf10: cpu_intr+0x180 (0x3,0x805104b8,0x80561b3c,0) ra 0x80011a24 sz 56
0x8f87bf48: mips3_user_intr+0xe4 (0x3,0x805104b8,0x80561b3c,0) ra 0 sz 0
User-level: pid 631.631
db> 
>How-To-Repeat:
See above.
>Fix:
N/A



Home | Main Index | Thread Index | Old Index