Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109607482
D27067.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
D27067.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D27067: Move cryptodev_cb earlier before it is used.
Attached
Detach File
Event Timeline
Log In to Comment