Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133016727
D26811.id78291.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
D26811.id78291.diff
View Options
Index: sys/opencrypto/crypto.c
===================================================================
--- sys/opencrypto/crypto.c
+++ sys/opencrypto/crypto.c
@@ -1539,7 +1539,7 @@
* match), then skip.
*/
cap = crypto_drivers[hid];
- if (cap->cc_dev == NULL ||
+ if (cap == NULL ||
(cap->cc_flags & match) == 0)
continue;
@@ -1879,15 +1879,18 @@
if (krp->krp_status != 0)
CRYPTOSTAT_INC(cs_kerrs);
- CRYPTO_DRIVER_LOCK();
cap = krp->krp_cap;
- KASSERT(cap->cc_koperations > 0, ("cc_koperations == 0"));
- cap->cc_koperations--;
- if (cap->cc_koperations == 0 && cap->cc_flags & CRYPTOCAP_F_CLEANUP)
- wakeup(cap);
- CRYPTO_DRIVER_UNLOCK();
- krp->krp_cap = NULL;
- cap_rele(cap);
+ if (cap != NULL) {
+ CRYPTO_DRIVER_LOCK();
+ KASSERT(cap->cc_koperations > 0, ("cc_koperations == 0"));
+ cap->cc_koperations--;
+ if (cap->cc_koperations == 0 &&
+ cap->cc_flags & CRYPTOCAP_F_CLEANUP)
+ wakeup(cap);
+ CRYPTO_DRIVER_UNLOCK();
+ krp->krp_cap = NULL;
+ cap_rele(cap);
+ }
ret_worker = CRYPTO_RETW(0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 23, 2:37 AM (5 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24079144
Default Alt Text
D26811.id78291.diff (1 KB)
Attached To
Mode
D26811: Fix a couple of bugs for asym crypto introduced in r359374.
Attached
Detach File
Event Timeline
Log In to Comment