Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146677095
D4351.id10677.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
D4351.id10677.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/file.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/file.h
+++ sys/compat/linuxkpi/common/include/linux/file.h
@@ -89,7 +89,10 @@
*/
fdclose(curthread, file, fd);
- /* drop extra reference */
+ /* drop reference from fget_unlocked() */
+ fdrop(file, curthread);
+
+ /* drop extra reference from falloc() */
fdrop(file, curthread);
}
@@ -106,7 +109,10 @@
filp->_file = file;
finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops);
- /* drop the extra reference */
+ /* drop the reference from fget_unlocked() */
+ fput(filp);
+
+ /* drop extra reference from falloc() */
fput(filp);
}
@@ -120,8 +126,6 @@
error = falloc(curthread, &file, &fd, 0);
if (error)
return -error;
- /* drop the extra reference */
- fdrop(file, curthread);
return fd;
}
@@ -135,8 +139,6 @@
error = falloc(curthread, &file, &fd, flags);
if (error)
return -error;
- /* drop the extra reference */
- fdrop(file, curthread);
return fd;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 5, 3:41 PM (12 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29266443
Default Alt Text
D4351.id10677.diff (1 KB)
Attached To
Mode
D4351: LINUXKPI: Prevent fd getting closed before installed
Attached
Detach File
Event Timeline
Log In to Comment