Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108552051
D35382.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
919 B
Referenced Files
None
Subscribers
None
D35382.diff
View Options
diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c
--- a/sys/opencrypto/crypto.c
+++ b/sys/opencrypto/crypto.c
@@ -1527,6 +1527,7 @@
static int
crypto_invoke(struct cryptocap *cap, struct cryptop *crp, int hint)
{
+ int error;
KASSERT(crp != NULL, ("%s: crp == NULL", __func__));
KASSERT(crp->crp_callback != NULL,
@@ -1575,13 +1576,19 @@
crp->crp_etype = EAGAIN;
crypto_done(crp);
- return 0;
+ error = 0;
} else {
/*
- * Invoke the driver to process the request.
+ * Invoke the driver to process the request. Errors are
+ * signaled by setting crp_etype before invoking the completion
+ * callback.
*/
- return CRYPTODEV_PROCESS(cap->cc_dev, crp, hint);
+ error = CRYPTODEV_PROCESS(cap->cc_dev, crp, hint);
+ KASSERT(error == 0 || error == ERESTART,
+ ("%s: invalid error %d from CRYPTODEV_PROCESS",
+ __func__, error));
}
+ return (error);
}
void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 6:33 AM (2 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16188368
Default Alt Text
D35382.diff (919 B)
Attached To
Mode
D35382: crypto: Validate return values from CRYPTODEV_PROCESS()
Attached
Detach File
Event Timeline
Log In to Comment