From b2e5e9af2dfa550049df2232ed862cb801cd720c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 19 Aug 2003 17:08:35 +0000 Subject: [PATCH] As the BeOS documentation states what will happen in the future, delete_area() now only allows to delete areas you have created yourself before from userland, again. The kernel's delete_area() still allows everything, though. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4320 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/vm/vm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/kernel/core/vm/vm.c b/src/kernel/core/vm/vm.c index 469a2c4aa7..5e64166280 100755 --- a/src/kernel/core/vm/vm.c +++ b/src/kernel/core/vm/vm.c @@ -2402,7 +2402,10 @@ _user_create_area(const char *userName, void **userAddress, uint32 addressSpec, status_t _user_delete_area(area_id area) { - // ToDo: works only correctly if the area belongs to the caller! - return _vm_delete_region(NULL, area); + // Unlike the BeOS implementation, you can now only delete areas + // that you have created yourself from userland. + // The documentation to delete_area() explicetly states that this + // will be restricted in the future, and so it will. + return vm_delete_region(vm_get_current_user_aspace_id(), area); }