Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141972830
D53708.id166355.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
905 B
Referenced Files
None
Subscribers
None
D53708.id166355.diff
View Options
diff --git a/sys/fs/cuse/cuse.c b/sys/fs/cuse/cuse.c
--- a/sys/fs/cuse/cuse.c
+++ b/sys/fs/cuse/cuse.c
@@ -1516,13 +1516,6 @@
}
pcc = malloc(sizeof(*pcc), M_CUSE, M_WAITOK | M_ZERO);
- if (devfs_set_cdevpriv(pcc, &cuse_client_free)) {
- printf("Cuse: Cannot set cdevpriv.\n");
- /* drop reference on server */
- cuse_server_unref(pcs);
- free(pcc, M_CUSE);
- return (ENOMEM);
- }
pcc->fflags = fflags;
pcc->server_dev = pcsd;
pcc->server = pcs;
@@ -1553,10 +1546,12 @@
}
cuse_server_unlock(pcs);
- if (error) {
- devfs_clear_cdevpriv(); /* XXX bugfix */
+ if (error != 0)
return (error);
- }
+
+ if ((error = devfs_set_cdevpriv(pcc, &cuse_client_free)) != 0)
+ return (error);
+
pccmd = &pcc->cmds[CUSE_CMD_OPEN];
cuse_cmd_lock(pccmd);
@@ -1575,9 +1570,6 @@
cuse_cmd_unlock(pccmd);
- if (error)
- devfs_clear_cdevpriv(); /* XXX bugfix */
-
return (error);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 15, 9:19 AM (19 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25287109
Default Alt Text
D53708.id166355.diff (905 B)
Attached To
Mode
D53708: cuse: Fix cdevpriv bugs in cuse_client_open()
Attached
Detach File
Event Timeline
Log In to Comment