Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178058822
D62135.1795872809.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
770 B
Referenced Files
None
Subscribers
None
D62135.1795872809.diff
View Options
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -1431,6 +1431,15 @@
rw_wunlock(&linux_vma_lock);
if (error != 0) {
+ /*
+ * The mmap method of the driver has already taken a
+ * reference for this mapping (dropped by the close
+ * method of its vm_ops). The vm_area_struct is
+ * discarded here, so close it first: otherwise every
+ * second mapping of the same object leaks that
+ * reference (and the object with it).
+ */
+ vmap->vm_ops->close(vmap);
/* free allocated VM area struct */
linux_cdev_handle_free(vmap);
/* check for stale VM area struct */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 28, 1:33 PM (13 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42065548
Default Alt Text
D62135.1795872809.diff (770 B)
Attached To
Mode
D62135: linuxkpi: Call the close method of a mapping that is discarded in mmap
Attached
Detach File
Event Timeline