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.
This commit is contained in:
Andreas Kling 2019-12-02 18:15:36 +01:00
commit 7dc9c90f83
Notes: sideshowbarker 2024-07-19 10:59:01 +09:00

View file

@ -108,7 +108,7 @@ public:
void set_writable(bool b) void set_writable(bool b)
{ {
if (b) if (b)
m_access |= Access::Read; m_access |= Access::Write;
else else
m_access &= ~Access::Write; m_access &= ~Access::Write;
} }