After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685072 - memory: map(READ)/unmap clears the READONLY status
memory: map(READ)/unmap clears the READONLY status
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.0.0
Other Linux
: Normal normal
: 1.0.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-28 20:32 UTC by Olivier Crête
Modified: 2012-09-28 23:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to check the readonly flag on lock (2.03 KB, patch)
2012-09-28 20:32 UTC, Olivier Crête
committed Details | Review
miniobject: Make is_writable() only refer to the mini object, not it's content (2.85 KB, patch)
2012-09-28 20:54 UTC, Olivier Crête
rejected Details | Review

Description Olivier Crête 2012-09-28 20:32:28 UTC
Created attachment 225359 [details] [review]
Patch to check the readonly flag on lock

Currently, if one locks and unlocks a GstMiniObject in read-mode, the read-only status is cleared.. As read-only is only a read lock with a count of one..

After discussion with Wim, let's explicitly check the readonly flag.
Comment 1 Wim Taymans 2012-09-28 20:53:47 UTC
ok, commit!
Comment 2 Olivier Crête 2012-09-28 20:54:37 UTC
Created attachment 225360 [details] [review]
miniobject: Make is_writable() only refer to the mini object, not it's content

In the same vein, there was a confusion on what writable was for a mini-object. Let's try to clarify it
Comment 3 Wim Taymans 2012-09-28 20:57:07 UTC
(In reply to comment #2)
> Created an attachment (id=225360) [details] [review]
> miniobject: Make is_writable() only refer to the mini object, not it's content
> 
> In the same vein, there was a confusion on what writable was for a mini-object.
> Let's try to clarify it

This is wrong, is_writable() uses the exclusive counter when enabled and the
refcount otherwise. This method should be called has_exclusive_access() or something.
Comment 4 Olivier Crête 2012-09-28 23:37:09 UTC
Comment on attachment 225359 [details] [review]
Patch to check the readonly flag on lock

commit fd846a7c64faa263bcaff355e9a504b69afc6d73
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Fri Sep 28 15:17:27 2012 -0400

    miniobject: Always reject WRITE locks on READONLY miniobjects
    
    Verify that mapping a read-only memory as read doesnt make it writable
Comment 5 Olivier Crête 2012-09-28 23:37:33 UTC
Committed per Wim's command!