Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108238604
D23078.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
928 B
Referenced Files
None
Subscribers
None
D23078.diff
View Options
Index: head/sys/opencrypto/cryptodev.c
===================================================================
--- head/sys/opencrypto/cryptodev.c
+++ head/sys/opencrypto/cryptodev.c
@@ -1499,20 +1499,21 @@
switch (cmd) {
case CRIOGET:
+ error = falloc_noinstall(td, &f);
+ if (error)
+ break;
+
fcr = malloc(sizeof(struct fcrypt), M_XDATA, M_WAITOK | M_ZERO);
TAILQ_INIT(&fcr->csessions);
mtx_init(&fcr->lock, "fcrypt", NULL, MTX_DEF);
- error = falloc(td, &f, &fd, 0);
-
+ finit(f, FREAD | FWRITE, DTYPE_CRYPTO, fcr, &cryptofops);
+ error = finstall(td, f, &fd, 0, NULL);
if (error) {
mtx_destroy(&fcr->lock);
free(fcr, M_XDATA);
- return (error);
- }
- /* falloc automatically provides an extra reference to 'f'. */
- finit(f, FREAD | FWRITE, DTYPE_CRYPTO, fcr, &cryptofops);
- *(u_int32_t *)data = fd;
+ } else
+ *(uint32_t *)data = fd;
fdrop(f, td);
break;
case CRIOFINDDEV:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 23, 11:56 PM (20 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16068181
Default Alt Text
D23078.diff (928 B)
Attached To
Mode
D23078: Use falloc_noinstall + finstall.
Attached
Detach File
Event Timeline
Log In to Comment