Page MenuHomeFreeBSD

D27067.diff
No OneTemporary

D27067.diff

Index: head/sys/opencrypto/cryptodev.c
===================================================================
--- head/sys/opencrypto/cryptodev.c
+++ head/sys/opencrypto/cryptodev.c
@@ -904,8 +904,6 @@
return (error);
}
-static int cryptodev_cb(struct cryptop *);
-
static struct cryptop_data *
cod_alloc(struct csession *cse, size_t aad_len, size_t len, struct thread *td)
{
@@ -936,6 +934,23 @@
}
static int
+cryptodev_cb(struct cryptop *crp)
+{
+ struct cryptop_data *cod = crp->crp_opaque;
+
+ /*
+ * Lock to ensure the wakeup() is not missed by the loops
+ * waiting on cod->done in cryptodev_op() and
+ * cryptodev_aead().
+ */
+ mtx_lock(&cod->cse->lock);
+ cod->done = true;
+ mtx_unlock(&cod->cse->lock);
+ wakeup(cod);
+ return (0);
+}
+
+static int
cryptodev_op(struct csession *cse, const struct crypt_op *cop,
struct ucred *active_cred, struct thread *td)
{
@@ -1338,23 +1353,6 @@
cod_free(cod);
return (error);
-}
-
-static int
-cryptodev_cb(struct cryptop *crp)
-{
- struct cryptop_data *cod = crp->crp_opaque;
-
- /*
- * Lock to ensure the wakeup() is not missed by the loops
- * waiting on cod->done in cryptodev_op() and
- * cryptodev_aead().
- */
- mtx_lock(&cod->cse->lock);
- cod->done = true;
- mtx_unlock(&cod->cse->lock);
- wakeup(cod);
- return (0);
}
static void

File Metadata

Mime Type
text/plain
Expires
Sat, Feb 8, 9:09 AM (3 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16524602
Default Alt Text
D27067.diff (1 KB)

Event Timeline