Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109369285
D41581.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D41581.diff
View Options
diff --git a/sys/crypto/blake2/blake2_cryptodev.c b/sys/crypto/blake2/blake2_cryptodev.c
--- a/sys/crypto/blake2/blake2_cryptodev.c
+++ b/sys/crypto/blake2/blake2_cryptodev.c
@@ -29,11 +29,9 @@
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
-#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/mutex.h>
-#include <sys/rwlock.h>
#include <sys/smp.h>
#include <blake2.h>
@@ -49,9 +47,7 @@
CTASSERT((size_t)BLAKE2B_KEYBYTES > (size_t)BLAKE2S_KEYBYTES);
struct blake2_softc {
- bool dying;
int32_t cid;
- struct rwlock lock;
};
static int blake2_cipher_setup(struct blake2_session *ses,
@@ -84,7 +80,6 @@
struct blake2_softc *sc;
sc = device_get_softc(dev);
- sc->dying = false;
sc->cid = crypto_get_driverid(dev, sizeof(struct blake2_session),
CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_SYNC |
@@ -94,8 +89,6 @@
return (ENOMEM);
}
- rw_init(&sc->lock, "blake2_lock");
-
return (0);
}
@@ -106,13 +99,8 @@
sc = device_get_softc(dev);
- rw_wlock(&sc->lock);
- sc->dying = true;
- rw_wunlock(&sc->lock);
crypto_unregister_all(sc->cid);
- rw_destroy(&sc->lock);
-
return (0);
}
@@ -142,21 +130,11 @@
blake2_newsession(device_t dev, crypto_session_t cses,
const struct crypto_session_params *csp)
{
- struct blake2_softc *sc;
struct blake2_session *ses;
int error;
- sc = device_get_softc(dev);
-
ses = crypto_get_driver_session(cses);
- rw_rlock(&sc->lock);
- if (sc->dying) {
- rw_runlock(&sc->lock);
- return (EINVAL);
- }
- rw_runlock(&sc->lock);
-
error = blake2_cipher_setup(ses, csp);
if (error != 0) {
CRYPTDEB("setup failed");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 5, 4:15 AM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16466898
Default Alt Text
D41581.diff (1 KB)
Attached To
Mode
D41581: blake2: Remove dieing flag and rw lock
Attached
Detach File
Event Timeline
Log In to Comment