tech-kern archive

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

Re: lockmgr: no context panic in bus_dmamem_map() call. wrote:

> Our analysis has concluded the panic does occur when bus_dmamem_map()
> is called during kernel stays in lwp==NULL state.  Apparently standard mbuf
> API allows the condition but bus_dmamem_map() does not.

Allocate buffer memory statically as nfe(4) or ti(4) does?
There is KASSERT(curlwp != NULL) in uvm_map_prepare(9)
with "detect a popular device driver bug" comment
and I don't think kernel_map is INTRSAFE.

Maybe we should have common mbuf APIs for jumbo MTU like
FreeBSD's m_getjcl(9) to share them among all NIC drivers.
(BTW, there is no NetBSD native driver which supports jumbo MTU!?)

Note we don't have to use bus_dmamem_alloc(9) there
if the driver has proper bus_dmamap_sync(9) calls
(which will handle necessary bounce buffer ops).
Izumi Tsutsui

Home | Main Index | Thread Index | Old Index