[refactor/fix] harden dmas

Various fixes related to dma API, missing validation on arguments,
pthread management and so on.
5 jobs for better-unit-tests in 5 minutes and 44 seconds (queued for 1 second)
Status Job ID Name Coverage
  Style
passed #44563
integration
checkpatch

00:00:10

passed #44562
integration
repoquality

00:00:11

 
  Build
passed #44564
make:generic

00:01:33

passed #44566
knl
make:knl

00:02:27

passed #44565
make:out-of-tree

00:01:32