CVSROOT: /cvs Module name: src Changes by: js...@cvs.openbsd.org 2016/05/31 09:11:26
Modified files: sys/dev : softraid_crypto.c Log message: Ensure that softraid crypto is not run on the crypto taskq. When softraid crypto was written, it was intended that all crypto operations would be run by softraid. As such, it called crypto_invoke() directly, rather than crypto_dispatch() which would queue the task for later processing. However, r1.53 of crypto/crypto.c started running completion callbacks as a separate task. This leads to deadlocks with the crypto taskq blocking in biowait, when softraid crypto volumes are stacked (often with vnds). In order to avoid task queueing and ensure that the operations are run within softraid, set the CRYPTO_F_NOQUEUE flag. With r1.62 of crypto/crypto.c crypto_dispatch() also started respecting this flag, hence we can also switch back to calling the standard crypto_dispatch() interface, rather than calling crypto_invoke() directly. Tested by Peter Wens (peter at wenka dot nl) - thanks! ok krw@ mlarkin@ mikeb@ tedu@