Hi,

I develop some drivers for crypto HW and met some difficulties.
Some algorithm functions are called behind crypto_kmap()

data = crypto_kmap(sg_page(sg), 0);

It will do inc_preempt_count();

I try to use DMA controller to perform memory transfers and try to use
wait_for_completion()

But of course  it gives

BUG: sleeping function called from invalid context at kernel/sched.c:5786

What is the best way to handle such case?

Thanks,
Dmitry


--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to