[Bug 789952] fbmemory: need unmap if mapping flags are not subset of previous

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Nov 6 08:31:08 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=789952

Matthew Waters (ystreet00) <ystreet00 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #363033|none                        |reviewed
             status|                            |

--- Comment #2 from Matthew Waters (ystreet00) <ystreet00 at gmail.com> ---
Review of attachment 363033:
 --> (https://bugzilla.gnome.org/review?bug=789952&attachment=363033)

What's the exact sequence of events you're attempting to allow?

e.g.
gst_memory_map(READ)
gst_memory_map(WRITE)
gst_memory_unmap(READ)
gst_memory_unmap(WRITE)

or,

gst_memory_map(READ)
gst_memory_unmap(READ)
gst_memory_map(WRITE)
gst_memory_unmap(WRITE)

The first is unsupported and should return NULL.  The second is valid usage
though.

::: gst-libs/gst/allocators/gstfdmemory.c
@@ +103,3 @@
+      munmap ((void *) mem->data, gmem->maxsize);
+      mem->data = NULL;
+      mem->mmap_count = 0;;

And how do we know that this is safe?  i.e. another user does not have another
mapping?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list