freebsd-dev/sys/opencrypto
Pawel Jakub Dawidek bda0abc627 We must synchronize access to cc_qblocked, because there could be a race
where crypto_invoke() returns ERESTART and before we set cc_qblocked to 1,
crypto_unblock() is called and sets it to 0. This way we mark device as
blocked forever.

Fix it by not setting cc_qblocked in the fast path and by protecting
crypto_invoke() in the crypto_proc thread with CRYPTO_Q_LOCK().
This won't slow things down, because there is no contention - we have
only one crypto thread. Actually it can be slightly faster, because we
save two atomic ops per crypto request.
The fast code path remains lock-less.
2006-05-22 07:48:45 +00:00
..
cast.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
cast.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
castsb.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
criov.c - Implement cuio_apply(), an equivalent to m_apply(9). 2006-05-17 17:56:00 +00:00
crypto_if.m /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
crypto.c We must synchronize access to cc_qblocked, because there could be a race 2006-05-22 07:48:45 +00:00
cryptodev.c - Fix a very old bug in HMAC/SHA{384,512}. When HMAC is using SHA384 2006-05-17 18:24:17 +00:00
cryptodev.h - Fix a very old bug in HMAC/SHA{384,512}. When HMAC is using SHA384 2006-05-17 18:24:17 +00:00
cryptosoft.c - Fix a very old bug in HMAC/SHA{384,512}. When HMAC is using SHA384 2006-05-17 18:24:17 +00:00
cryptosoft.h - Fix a very old bug in HMAC/SHA{384,512}. When HMAC is using SHA384 2006-05-17 18:24:17 +00:00
deflate.c malloc.h relies on param.h for a definition of MAXCPU. I guess that there is 2005-05-30 05:01:44 +00:00
deflate.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
rmd160.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
rmd160.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
skipjack.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
skipjack.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
xform.c - Fix a very old bug in HMAC/SHA{384,512}. When HMAC is using SHA384 2006-05-17 18:24:17 +00:00
xform.h - Fix a very old bug in HMAC/SHA{384,512}. When HMAC is using SHA384 2006-05-17 18:24:17 +00:00