Can bus_dmamap_unload() be called before the load completes?
I am currently working on an alternate bus_dma(9) implementation for
use with the Xen drivers .
I have a question regarding how the bus_dma(9) interface is expected to be used:
If the load is deferred because of a shortage of resources, is it
"legal" to call unload before the load completes?
In my implementation, if unload is called while the load is waiting
for resources, it would result in a segmentation fault and leak
memory. Do I need to handle that possibility, or is it ok to assume
that unload won't be called before the load completes?