summaryrefslogtreecommitdiff
path: root/Kernel/VM/Region.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-02 18:15:36 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-02 18:15:36 +0100
commit7dc9c90f83f5300251a574e1408085024306ab5a (patch)
tree79dd9221616a5540da3a647fc793164ea7c98426 /Kernel/VM/Region.h
parent64e77c262e7f7d84009f3b6b5edc12d7c4ba56e8 (diff)
downloadserenity-7dc9c90f83f5300251a574e1408085024306ab5a.zip
Kernel: Fix bug where mprotect() would ignore setting PROT_WRITE
A typo in Region::set_writable() caused us to update the readable flag rather than the writable flag.
Diffstat (limited to 'Kernel/VM/Region.h')
-rw-r--r--Kernel/VM/Region.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/VM/Region.h b/Kernel/VM/Region.h
index 4ea3c2f7fc..2c5890c7b6 100644
--- a/Kernel/VM/Region.h
+++ b/Kernel/VM/Region.h
@@ -108,7 +108,7 @@ public:
void set_writable(bool b)
{
if (b)
- m_access |= Access::Read;
+ m_access |= Access::Write;
else
m_access &= ~Access::Write;
}