Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135667939
D19214.id53992.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
802 B
Referenced Files
None
Subscribers
None
D19214.id53992.diff
View Options
Index: sys/amd64/sgx/sgx_linux.c
===================================================================
--- sys/amd64/sgx/sgx_linux.c
+++ sys/amd64/sgx/sgx_linux.c
@@ -77,23 +77,19 @@
len = IOCPARM_LEN(cmd);
if (len > SGX_IOCTL_MAX_DATA_LEN) {
- printf("%s: Can't copy data: cmd len is too big %d\n",
- __func__, len);
- return (EINVAL);
+ error = EINVAL;
+ goto out;
}
if (cmd & LINUX_IOC_IN) {
error = copyin((void *)args->arg, data, len);
- if (error) {
- printf("%s: Can't copy data, error %d\n",
- __func__, error);
- return (EINVAL);
- }
+ if (error != 0)
+ goto out;
}
- error = (fo_ioctl(fp, args->cmd, (caddr_t)data, td->td_ucred, td));
+ error = fo_ioctl(fp, args->cmd, (caddr_t)data, td->td_ucred, td);
+out:
fdrop(fp, td);
-
return (error);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 12, 6:10 PM (18 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25223885
Default Alt Text
D19214.id53992.diff (802 B)
Attached To
Mode
D19214: Fix refcount leak in SGX Linux compat ioctl handlers.
Attached
Detach File
Event Timeline
Log In to Comment