Don't set cc_kqblocked twice and don't increment cryptostats.cs_kblocks

twice if we call crypto_kinvoke() from crypto_proc thread.
This change also removes unprotected access to cc_kqblocked field
(CRYPTO_Q_LOCK() should be used for protection).
This commit is contained in:
Pawel Jakub Dawidek 2006-05-22 09:37:28 +00:00
parent 3aaf7145c5
commit 04d8f36a4f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158825

View file

@ -773,9 +773,7 @@ crypto_kinvoke(struct cryptkop *krp)
CRYPTO_DRIVER_LOCK();
if (error == ERESTART) {
cap->cc_koperations--;
cap->cc_kqblocked = 1;
CRYPTO_DRIVER_UNLOCK();
cryptostats.cs_kblocks++;
return (error);
}
} else {