From 04d8f36a4fa68591d45d2d12b260cb0b9668302c Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Mon, 22 May 2006 09:37:28 +0000 Subject: [PATCH] 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). --- sys/opencrypto/crypto.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c index 38d285c0ac9..36e32a7c576 100644 --- a/sys/opencrypto/crypto.c +++ b/sys/opencrypto/crypto.c @@ -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 {