Can bus_dmamap_unload() be called before the load completes?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Can bus_dmamap_unload() be called before the load completes?

Pratyush Yadav-2
Hi everyone,

I am currently working on an alternate bus_dma(9) implementation for
use with the Xen drivers [0].

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?

Regards,
Pratyush Yadav


[0] https://wiki.freebsd.org/SummerOfCode2018Projects/ImportXenbus_dmaFromOpenBSD
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"