[haiku-commits] haiku: hrev53378 - in src: system/kernel/vm kits/media

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 14 Aug 2019 20:13:57 -0400 (EDT)

hrev53378 adds 2 changesets to branch 'master'
old head: 8e84b3964633e545412cb2a053404246900938fc
new head: 72b37d9ffc7e083a3f44ebf24e064596e0392b63
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=72b37d9ffc7e+%5E8e84b3964633

----------------------------------------------------------------------------

2c4232b85347: BMediaRoster: Mark publishing areas as cloneable.

72b37d9ffc7e: kernel: Turn the clone-area-attempt panic into a dprintf.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 7 insertions(+), 6 deletions(-)
src/kits/media/MediaRoster.cpp | 6 ++++--
src/system/kernel/vm/vm.cpp    | 7 +++----

############################################################################

Commit:      2c4232b85347b8b8749f05a3b59275b7265f7a50
URL:         https://git.haiku-os.org/haiku/commit/?id=2c4232b85347
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Thu Aug 15 00:06:30 2019 UTC

BMediaRoster: Mark publishing areas as cloneable.

----------------------------------------------------------------------------

diff --git a/src/kits/media/MediaRoster.cpp b/src/kits/media/MediaRoster.cpp
index a7fdac23a3..77529bfc9e 100644
--- a/src/kits/media/MediaRoster.cpp
+++ b/src/kits/media/MediaRoster.cpp
@@ -601,7 +601,8 @@ BMediaRosterEx::PublishOutputs(const media_node& node, 
List<media_output>* list)
                size_t size;
                size = ROUND_UP_TO_PAGE(count * sizeof(media_output));
                request.area = create_area("publish outputs", &start_addr,
-                       B_ANY_ADDRESS, size, B_NO_LOCK, B_READ_AREA | 
B_WRITE_AREA);
+                       B_ANY_ADDRESS, size, B_NO_LOCK,
+                       B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA);
                if (request.area < B_OK) {
                        ERROR("PublishOutputs: failed to create area, %#" 
B_PRIx32 "\n",
                                request.area);
@@ -650,7 +651,8 @@ BMediaRosterEx::PublishInputs(const media_node& node, 
List<media_input>* list)
                size_t size;
                size = ROUND_UP_TO_PAGE(count * sizeof(media_input));
                request.area = create_area("publish inputs", &start_addr,
-                       B_ANY_ADDRESS, size, B_NO_LOCK, B_READ_AREA | 
B_WRITE_AREA);
+                       B_ANY_ADDRESS, size, B_NO_LOCK,
+                       B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA);
                if (request.area < B_OK) {
                        ERROR("PublishInputs: failed to create area, %#" 
B_PRIx32 "\n",
                                request.area);

############################################################################

Revision:    hrev53378
Commit:      72b37d9ffc7e083a3f44ebf24e064596e0392b63
URL:         https://git.haiku-os.org/haiku/commit/?id=72b37d9ffc7e
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Thu Aug 15 00:13:36 2019 UTC

kernel: Turn the clone-area-attempt panic into a dprintf.

----------------------------------------------------------------------------

diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp
index 2e1ce01cd4..05f1dace6b 100644
--- a/src/system/kernel/vm/vm.cpp
+++ b/src/system/kernel/vm/vm.cpp
@@ -2110,11 +2110,10 @@ vm_clone_area(team_id team, const char* name, void** 
address,
 
        if (!kernel && sourceAddressSpace != targetAddressSpace
                && (sourceArea->protection & B_CLONEABLE_AREA) == 0) {
-               // kernel areas must not be cloned in userland, unless 
explicitly
-               // declared user-cloneable upon construction
 #if KDEBUG
-               panic("attempting to clone area \"%s\" (%" B_PRId32 ")!",
-                       sourceArea->name, sourceID);
+               Team* team = thread_get_current_thread()->team;
+               dprintf("team \"%s\" (%" B_PRId32 ") attempted to clone area 
\"%s\" (%"
+                       B_PRId32 ")!\n", team->Name(), team->id, 
sourceArea->name, sourceID);
 #endif
                status = B_NOT_ALLOWED;
        } else if (sourceArea->cache_type == CACHE_TYPE_NULL) {


Other related posts: